Git Product home page Git Product logo

Comments (4)

dryabov avatar dryabov commented on July 18, 2024

The problem is that BOM is a part of the following translation key, and as a result it is not processed by Joomla. For example, let one have the following INI file:

<BOM>COM_MYEXT="My Ext"
COM_MYEXT_SMTH="..."

(where <BOM> is the 3-byte UTF-8 BOM sequence) and the following PHP file:

<?php echo JText::_('COM_MYEXT');

In this case Joomla is not able to find translation for COM_MYEXT. To bypass this error, many translation files have a comment in the first line:

<BOM>; Translations for My Ext
COM_MYEXT="My Ext"
COM_MYEXT_SMTH="..."

and that's why the Language rule displays error message in the former case, and just a warning in the latter one.

from jedchecker.

anibalsanchez avatar anibalsanchez commented on July 18, 2024

Thanks for the clarification.

Is this documented somewhere? It would be great if we can include a link as a reference. I'm sure that people are going to start asking what is it.

from jedchecker.

dryabov avatar dryabov commented on July 18, 2024

https://docs.joomla.org/Language_Guidelines_for_3rd_Party_Extensions:

All .ini language files need to be saved as UTF-8 no BOM for the proper display of characters which are not in the ASCII range [a..z] and [A..Z].

https://docs.joomla.org/J3.x:Making_a_Language_Pack_for_Joomla:

ALL FILES MUST BE SAVED AS UTF8 NO BOM (for non-ascii glyphs as in accented letters, etc.)

But none explains why it's necessary.

from jedchecker.

anibalsanchez avatar anibalsanchez commented on July 18, 2024

Great. Case closed.

from jedchecker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.