I have module mod_mymodule
and it has the same translations as component com_mycomponent
. I don't want to duplicate these same files and use only one file.
I load form from com_mycomponent
to mod_mymodule
and it has fields with labels like: COM_MYCOMPONENT_TEST
. In joomla_root/language/en-EN/en-EN.com_mycomponent.ini
I have translation to this.
I want to load joomla_root/language/en-EN/en-EN.com_mycomponent.ini
to module. I also tried to add JFactory::getLanguage()->load('com_ritcatalogue');
in mod_mymodule.php
. Not working. I also tried to load translations in module manifest file mod_mymodule.xml
<languages folder="language">
<language tag="en-EN">en-EN/en-EN.com_ritcatalogue.ini</language>
<language tag="en-EN">en-EN/en-EN.com_ritcatalogue.sys.ini</language>
</languages>
But my module only displays COM_MYCOMPONENT_TEST
$lang->getTag()
as $language_tag. But what if translation to this language does not exist? It should loaden-EN
translation. Actually doesn't load anythingen-EN
then$lang->getTag()
. It loads first translation if there is no the second one. Thank you.