0
votes

I checked out the question here: Joomla! 2.5 language file - translate description It is exact the problem I have but unfourtunately I cannot answer the commen from Valentin. So here is my Problem again:

In my xml-File I have this line:

<description>COM_MYCOMPONENT_DESCRIPTION</description>

And in the file en-GB.com_mycomponent.sys.ini I have this:

COM_MYCOMPONENT="MyComponent"
COM_MYCOMPONENT_DESCRIPTION="This is the myComponent description"
COM_MYCOMPONENT_SUMMARY="Summary"

But in Debug-Mode for Languages I have every time this result:

??COM_MYCOMPONENT_DESCRIPTION??

Any Ideas?

Björn

2
And do you have the file both in your component language folder and in the core language folder?Elin
No, I just have them in the core language folder administrator/language/en-GB. Do I need them in both? Why?DreiBaer
Yes you need it in both locations to get the description translated.Elin
No you don't need it in both locations! Leave the core language folder /language alone!Riccardo Zorn
I get it running, when I put the language file in both folder: administrator/language/en-GB and administrator/com_mycomponent/language/en-GB.DreiBaer

2 Answers

0
votes

You are using the language file correctly, therefore I am under the impression that it's due to the location of the file. Make sure you have the following in your XML file:

<languages folder="language">
        <language tag="en-GB">en-GB/en-GB.com_mycomponent.ini</language>
        <language tag="en-GB">en-GB/en-GB.com_mycomponent.sys.ini</language>
</languages>

Also take note of the location:

I have used folder="language" then used en-GB before the file name so the folder structure will be like so:

root(where the XML is)/language/en-GB/en-GB.com_mycomponent.sys.ini
0
votes

You don't have to put your language files in both places. Your first configuration is actually correct and is working on Joomla 3.3 for sure. In your manifest file you should have the language files declares as

<administration>
    ....
    <folder>language</folder>
    .....
 </administration>

and dont make use of

<languages>....</languages>

Also on your package the folder structure should be
admin/language/en-GB/en-GB.yourcomponent.sys.ini.

If you have this configuration already, you are correct.
In that case from the message of the language debug mode, I assume that you either have mispeled something or there is an error inside your language file.
The latter is what usually happens with me. For example many times I have this error:

COM_MYCOMPONENT_TRA="A translation string"
COM_MYCOMPONENT_ANOTHER_ONE="Another one"
COM_MYCOMPONENT_SOMEOTHER=Some othen translation string"
COM_MYCOMPONENT_MORE="One more "
COM_MYCOMPONENT_LAST_ONE="E translation string"

(Missing the first double quote on the third line).