SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 214 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

php
baz



Chapter 6
[ 159 ]
Our mylibrary class will now look something like this:
Translating Plugins
As part of a plugin, we can define a set of translations. A full description of how to
create language files is available in Chapter 9.
When we create plugin translation files, we must name the file according to a specific
naming convention: the language tag, a period, the Joomla! parsed plugin name.
For example, the English translation file for the plugin My Extension would be called
en-GB.plg_myextension.ini.
Plugin translation files are located in the administrator/language folders.
Unlike components and modules, plugin language files are not automatically loaded
when a plugin is loaded. To use a plugin language file we must manually load it.
We can do this using the static loadLanguage() method in the JPlugin class, as this
example demonstrates:
JPlugin::loadLanguage('plg_myextension', JPATH_ADMINISTRATOR);
Notice that when we load the language file we also tell Joomla! that the file is located
in the backend language folder.


Pages:
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6