Loading a specific ini file

A place to discuss Joomla! translation matters.

Moderator: wendhausen

Locked
tanko25
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue Dec 11, 2012 6:41 am

Loading a specific ini file

Post by tanko25 » Sat Dec 22, 2012 6:59 am

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: Select all

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!

irantamir
I've been banned!
Posts: 18
Joined: Tue Feb 12, 2013 10:54 pm

Re: Joomla Language Pack Issue

Post by irantamir » Wed Mar 13, 2013 10:05 am

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

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Loading a specific ini file

Post by infograf768 » Fri Mar 15, 2013 10:07 am

Changed Title of topic to fit.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group


Locked

Return to “Translations”