Support Tutorials Development Creating a Language Pack
Creating a Language Pack PDF Print E-mail
Tutorials - Development
Tuesday, 07 March 2006 11:06

Adding new languages to JCE is relatively easy and is done through the installation of Language Packs.

Language Packs contain all the php and javascript language files for the Admin Component, Editor Mambot and optionally extra plugins.

Language Packs are installed using the JCE Language Installer, found with in the JCE Admin Component. This is very similar to the Joomla! Language Installer, and like it and the other Joomla! installers, uses an XML file to instruct he installer as to what files to install and where to install them, what language is being installed and various other things.

The best way to get started in creating your own language pack is to have a look at the English pack included with the Admin Component. The XML file in this pack will give you a good indication of what files to translate, where they are, and how to create your own xml file.

The basic structure of the xml file looks like this :

<?xml version="1.0" ?>

<mosinstall version="1.0.0" type="jcelang" lang="en">

<name>English</name>

<version>1.0</version>

<creationDate>2005</creationDate>

<author>Ryan Demmer</author>

<authorEmail>N/A</authorEmail>

<authorUrl>N/A</authorUrl>

<copyright>Ryan Demmer</copyright>

<license>LGPL</license>

<description>English Language files for JCE</description>

<files>

<filename language="en">langs/en.js</filename>

<filename>themes/advanced/langs/en.js</filename>

<filename>plugins/advimage/langs/en.js</filename>

<filename>plugins/directionality/langs/en.js</filename>

<filename>plugins/emotions/langs/en.js</filename>

<filename>plugins/fullscreen/langs/en.js</filename>

<filename>plugins/paste/langs/en.js</filename>

<filename>plugins/preview/langs/en.js</filename>

<filename>plugins/print/langs/en.js</filename>

<filename>plugins/searchreplace/langs/en.js</filename>

<filename>plugins/table/langs/en.js</filename>

</files>

<administration>

<files>

<filename>en.php</filename>

</files>

</administration>

</mosinstall>

 This directory structure within the archived file (zip) should be identical to the XML structure.

 Although the basic installer and file structure (as represented above) does not include  other plugins (Image Manager etc.) it is possible to include them in your language pack and requires nothing more than adding the appropriate lines to the xml file. eg:

<filename>plugins/imgmanager/langs/en.js</filename>
<filename>plugins/imgmanager/langs/en.php</filename>

Custom help images can also be included, and should be referenced like this:
<filename>plugins/imgmanager/docs/images/en/upload.gif</filename>

Thats pretty much all there is to it. Once the Language Pack is packaged, it is ready to be installed using the JCE Language Manager. 

 

Please Note: The xml file must be named with the same name as the language itself, ie: en.xml, or de.xml or pt_br.xml etc. 

Last Updated on Thursday, 25 January 2007 14:38
 

Search

Tweets

  • JCE

    JCE 1.5.8 beta3 released to subscribers - http://bit.ly/b71fEJ - Users of beta3 can upgrade using the Updater in the JCE Control Panel!

    Tuesday, 24 August 2010 15:18

  • JCE

    JCE 1.5.8 beta 2 released to subscribers - http://bit.ly/bVYMkM

    Friday, 13 August 2010 12:26

Banner_Professional_JCE_Support_200x77

Your Account