Search code examples
joomlajoomla-extensions

Joomla | Module internationalization | New developer


I try to create a very simple module in Joomla. While my whole code is correct, and the module working properly, I cannot make it support the I18n feature.

More specific, my module directory is like that:

mod_mymodname:
    languages:
        en-GB.mod_mymodname.ini
    mod_mymodname.php
    mod_mymodname.xml

and then in my mod_mymodname.xml I have that code :

<?xml version="1.1" encoding="utf-8"?>
<extension type="module" version="2.5.0" client="site">
    <name>MyModName</name>
    ... Other Options ...
    <files>
        <filename module="mod_mymodname">mod_mymodname.php</filename>
        <filename>mod_mymodname.xml</filename>
    </files>
    <languages folder="languages">
        <language tag="en-GB">en-GB.mod_mod_mymodname.ini</language>
    </languages>
    <config>
        <fields name="params">
            <fieldset name="basic">
                <field name="modid" size="50" type="text" label="MODID" description="Description here" />
            </fieldset>
        </fields>
    </config>
</extensions>

and my en-GB.mod_mymodname.ini has that content in it

MODID=Module ID

The problem is that in my admin section the field label has the value of "MODID" instead of "Module ID"

Is there anything wrong with that ? Is my first Joomla module, and I am not sure if everything is correct.

Note : The module doesn't require any translation in the front-end. I only need I18n for the administration section.


Solution

  • make sure you mentioned correct text for MODID in language file.

    en-GB.mod_mymodname.ini ---> This file was used for declaring the text what we given in that module
    
    • Just add the following line in en-GB.mod_mymodname.ini this language file.

    MODID="Module ID"

    Save and check the module.. Hope this will work....