Alfred wrote:
Hi,
I'm confused, i thought admin ini files needed to go to:
/administrator/language/nl-NL/nl-NL.com_mycom.ini
and site ini files to:
/language/nl-NL/nl-NL.com_mycom.ini
But now I also see site files go to:
/components/com_mycom/language/nl-NL/nl-NL.com_mycom.ini
and a new file go to:
/language/nl-NL/nl-NL.ini
So now there are 3 places to put my extensions language files ?
Pls can someone tell me the official way for Joomla 1.7
Not sure what you mean by
Quote:
and a new file go to:
/language/nl-NL/nl-NL.ini
Since 1.6 there are 2 ways to install language files for an extension.
One can use one or the other or a combination of both.
The 1.5 way will install the files in the CORE language folders (ROOT/administrator/language/ and ROOT/language/ ).
The new way —since 1.6— includes the files in a "language" folder installed at the root of the extension.
Therefore an extension can include a language folder with a .sys.ini different from the one installed in joomla core language folders (this last one not being included in that language folder but in root or any other folder not installed).
This let's display 2 different descriptions: one from the language folder is used as a message displayed when install has been done, the other is used for "normal" operation, i.e. when the extension is edited in back-end.
This can be extremely useful when installing also uses some scripts and requires a different value for the description.
Therefore, the xml would include since 1.6
Code:
<files>
<[...]
<folder>language</folder> // This folder HAS to include the right subfolders, i.e. language/en-GB/ ... language/fr-FR/
<filename>whatever</filename>
[...]
</files>
and/or then (1.5 way):
Code:
<languages folder="joomlacorelanguagefolders"> // if using another language folder for cleanliness (any folder name will fit)
<language tag="en-GB">en-GB/en-GB.whatever.ini</language> // or
<language tag="en-GB">en-GB.whatever.ini</language> if no tagged subfolder
<language tag="en-GB">en-GB/en-GB.whatever.sys.ini</language> // or
<language tag="en-GB">en-GB.whatever.sys.ini</language> if no tagged subfolder
</languages>
OR simply in root
Code:
<languages>
<language tag="en-GB">en-GB.whatever.ini</language>
<language tag="en-GB">en-GB.whatever.sys.ini</language>
</languages>
When installing or upgrading the extension, it is the sys.ini file present in the extension root language folder which will display the result of the install from the description key/value.
Therefafter, if present, the sys.ini as well as the ini installed in CORE language folder will have priority over the files present in the root language folder of the extension.
Note:
One advantage of installing the files in the extension "language" folder is that these are not touched when updating a language pack.
The other advantage is that this folder can include multiple languages (en-GB always, fr-FR, it-IT, etc.) not requiring the user to install the corresponding language pack. This is handy as they are available if, later on, a user installs the corresponding pack.
_________________
Jean-Marie Simonet / infograf ·
http://www.info-graf.fr Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group