I don't know where to post this topic, here or in the plugin section ?
I've seen other posts on this subject but it seems that there is no good answer yet.
So I make another try in order to have a good answer or even a new feature in a future release ?
When we create a plugin for several languages that display text in the frontend, there are some annoying limits in Joomla.
Gardener explains the problem very well in this post : http://forum.joomla.org/viewtopic.php?f ... &view=next
Like Gardener I work with backoffice in English only, but my frontend can have several languages. Language folder for frontend with several subfolder of ini files exist, but language folder for backoffice contains only the en-GB folder...Gardener wrote:Extra languages for plugins are installed in the Administrator language area. Since this is hardcoded in the Plugin Installer (setting application to 1 for media and languages) it can't be changed either. I'm wondering what the reasoning for this is, since the plugins are generally used on the frontend.
It's also not how it should work according to the wiki page on creating plugins:
To make the language load, the loadLanguage() method has to be called with 'administrator' as the second argument.
This wouldn't be much of a problem, except it seems to be fairly common for site administrators to only install the frontend language and keep the administrator in English. I know I do.
The installer also doesn't throw an error if it isn't able to install the language files. Which is odd, as the uninstaller does, if it isn't able to remove the file (which wasn't installed in the first place).
Even if the workaround of Schlu is technically ok :
Code: Select all
//Load the Plugin language file out of the administration $lang = & JFactory::getLanguage(); $lang->load('plg_conten_myplugin', JPATH_ADMINISTRATOR);
Even, so, this workaround is ok, you need to have as many admin languages installed as there are in your frontend, which is not the case, nor even explained anywhere...
So please, is there a way to create international plugin displaying localized text in frontend ?
Thanks for your answer