-
Book Overview & Buying
-
Table Of Contents
Mastering Joomla! 1.5 Extension and Framework Development Second Edition
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, Customizing the Page.
When we create plugin translation files we must name the file according to a specific naming convention: the language tag, a period, and the Joomla! parsed plugin name. For example, the English translation file for the plugin boxoffice would be called en-GB.plg_boxoffice.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 the following example demonstrates:
JPlugin::loadLanguage('plg_boxoffice', JPATH_ADMINISTRATOR);Notice that when we load the language file we also tell Joomla! that the file is located in the backend language folder. Plugin language...
Change the font size
Change margin width
Change background colour