简体   繁体   中英

create multiple language joomla modules

I create a modules for joomla that support multiple language in fond-end and back-end.frond-end is fine and i have not problem in front-end.but language option not working in back-end.i have added some parameter in .xml file inside config tag to get data from admin.in the label i put string and consider value for that string in language file. section config and section language of my .xml file is:

<config>
        <fields name="params">
            <fieldset name="basic">
                <field name="show_type" type="checkbox" label="MOD_MYMODULE_SHOW_TYPE" />
        </fields>
    </config>
    <languages folder="path/to/language">
        <language tag="en-GB">en-GB/en-GB.mod_mymodule.ini</language>
        <language tag="en-GB">en-GB/en-GB.mod_mymodule.sys.ini</language>
    </languages>

in en-GB.mod_mymodule.sys.ini file I put this line :

MOD_MYMODULE_SHOW_TYPE = "show type"

But it does not work.how i should put language variable in .xml file?

Try this,

You have to add language file constants in en-GB.mod_mymodule.ini not in en-GB.mod_mymodule.sys.ini

MOD_MYMODULE_SHOW_TYPE = "show type" 

should be add inside en-GB.mod_mymodule.ini file

you can download a working sample from here

Hope its works..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM