I am in the process of adding some lines of code to change the language automatically when the language is changed in the language selection module. One of my component in Joomla, it doesn’t respect the language changing through language selection.
it’s already the language.ini file is in the language directory is corresponding to this language. But the language is not changed. Is there any special joomla code to make it dynamic?
You should output text in Joomla like this:
And you’ll have to create an ini file with the language code and the name of the component/model. E.g.: en-GB.mod_modulename.ini. In this file you can define the translation for the string, like:
When switching the language, the lines where JText is used, will display the correct language.