joomla plugin -- frontend language

For Joomla! 2.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Note: All 1.6, 1.7 and 3.5 releases have reached end of life and should be updated to 3.x.

Moderator: ooffick

Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Locked
alexdran
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Mar 24, 2011 9:49 pm

joomla plugin -- frontend language

Post by alexdran » Sat Jul 18, 2015 3:11 am

Hello all,
is there a way for a plugin to install a front-end language file

I only can get back-end language .ini and .sys.ini files with xml manifest
<languages folder="language">
<language tag="en-GB"> ..........


what is the correct manifest parameter to have the plugin using its
front-end language file ?

thank you in advance
Alex
Last edited by imanickam on Sat Jul 18, 2015 3:23 am, edited 1 time in total.
Reason: Moved the topic from the forum General Questions/New to Joomla! 2.5 to the forum Joomla! 2.5 Coding

alexdran
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Mar 24, 2011 9:49 pm

Re: joomla plugin -- frontend language

Post by alexdran » Tue Jul 28, 2015 9:05 am

Hello again,
any news regarding this topic ?

I have investigated a bit but still cannot find a proper way for my xml system plugin
to install a language file to front-end (what is the option I should use)

the alternatives I would like to avoid are:
- a script.php file for installation / dis-installation of the plugin (with file copy)
- convert the whole solution into a Joomla Module

thank you again for any help
Alessandro

alexdran
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Mar 24, 2011 9:49 pm

Re: joomla plugin -- frontend language

Post by alexdran » Fri Jul 31, 2015 10:11 am

hello all
any news regarding this? thank you advance for any help

Alessandro

MargaretG
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Jul 29, 2015 1:12 pm

Re: joomla plugin -- frontend language

Post by MargaretG » Fri Jul 31, 2015 10:38 am

To use language files in your own extension you need to specify the file in the xml installation manifest, for example:-
<languages folder="languages-front">
<language tag="en-GB">en-GB/en-GB.com_myExtension.ini</language>
<language tag="pl-PL">pl-PL/pl-PL.com_myExtension.ini</language>
</languages>
Try this code. Will be useful to you.

alexdran
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Mar 24, 2011 9:49 pm

Re: joomla plugin -- frontend language

Post by alexdran » Fri Jul 31, 2015 11:32 am

unfortunately does not load the file in the front-folder
indeed even copying it manually the plugin does not load any language file (in the front-end)
very strange


I have solved another way:
moving the language files in /administrator/ or system plugin

with
<languages folder="language">
or

<files>
<!-- <folder>language</folder>-->


and loading in the code the language by:

$lang = JFactory::getLanguage();
$lang->load('plg_system_MYPLUGIN', JPATH_ADMINISTRATOR);



thank you for help, you drove me anyway to a solution
Alex :)


Locked

Return to “Joomla! 2.5 Coding”