The Joomla! Forum ™






Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Dec 22, 2012 6:59 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Dec 11, 2012 6:41 am
Posts: 6
If want to use a language file just for your plugin, the language file you create should be named after the plugin. The usual convention for plugins, if I'm right is this:

plg_[group]_[plugin_name].ini (for the .sys.ini file the convention is the same)

Besides, if you want to load another language file, you could do something like this:

Code:
JFactory::getLanguage()->load( 'com_componentname', [ROOT_FOLDER] )

Where [ROOT_FOLDER] is usually JPATH_ROOT or JPATH_ADMINISTRATOR, depending on where you have your language file ( for plugins, the usual place, at least in recent Joomla versions, is in the administrator. Besides, make sure the file you created is fully UTF-8 encoded!

I hope it helps!

_________________
http://irancella.ir
http://emaaden.ir


Top
 Profile  
 
PostPosted: Wed Mar 13, 2013 10:05 am 
I've been banned!

Joined: Tue Feb 12, 2013 10:54 pm
Posts: 18
hi tanko25
i read your post now i want to add a language like that you said
but i cant , can you explain more?
or give me a sample


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 10:07 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17194
Location: **Translation Matters**
Changed Title of topic to fit.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 



Who is online

Users browsing this forum: No registered users and 29 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group