Create a component with the following description in the manifest
<description>COM_MYCOMPONENT_XML_DESCRIPTION</description>
On successfull installation translated language text displayed below successfull installation message.
Non-translated text COM_MYCOMPONENT_XML_DESCRIPTION displayed instead.
Rerun installation and now the translated text displayed, as expected result.
Uninstall the component and repeat the installation COM_MYCOMPONENT_XML_DESCRIPTION displayed again.
Joomla 3.8.5
Status | New | ⇒ | Discussion |
Its in both com_mycomponent.sys.ini file and com_mycomponent.ini
The one it uses when the installation is rerun is the one in com_mycomponent.sys.ini
Without uninstalling if I change the text (in the source) I have to rerun the installation twice before the new text appears.
Can't confirm. It works fine when testing with my component.
Chances are your language file is corrupt and thus doesn't get loaded.
If language file corrupt why would it work the second time?
Example component illustrating the problem can be found here:
https://github.com/brainforgeUK/com_example
I guess the .ini as well as the sys.ini are not in the correct language/xx-XX/ folder in the component.
If I remember well, the translation would show in that case.
Look the way it is done for the multilangstatus module:
https://github.com/joomla/joomla-cms/blob/staging/administrator/modules/mod_multilangstatus/mod_multilangstatus.xml#L13-L22
Evidently, you have to separate admin and site files.
You need to move the files to /admin/language/en-GB/en-GB.com_example.sys.ini and reference them correctly again in the manifest, then it works.
However instead of using the <language>
tag which puts the files into the global language folder, you should better just use <folder>language</folder>
in your manifest. This would install the language files to you component directory.
I'm closing this issue as it's an error in the manifest.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-02-09 15:08:56 |
Closed_By | ⇒ | Bakual |
Did you put that language string into the com_mycomponent.sys.ini file or just into the com_mycomponent.ini?