Confluence 2.9 : Language Pack Plugins
This page last changed on Jul 19, 2007 by smaddox.
To run Confluence in another language, you must install a language pack plugin for that translation. Guides and tools for collaboratively creating translations have been made available to the Confluence community. This page provides a technical overview of plugins, for users interested in creating or updating a translation. To install a translation, check out Community Translations.
Language Pack OverviewLanguage plugins are placed in the <CONFLUENCE-INSTALL-DIRECTORY>/languages/<KEY> directory, where <KEY> is the international language identifier. They consist of three files:
Directory StructureThe location of the three files that compose a Language Pack plugin is as follows: ./src/etc/com/atlassian/confluence/<PATH_OF_PROPERTIES_FILE> ./src/etc/templates/languages/<LANGUAGE_KEY>/<LANGUAGE_KEY>.gif ./src/etc/atlassian-plugin.xml As an example, this is the directory listing of the German translation ("de_DE"): ./confluence-2.2-std/plugins/de_DE/src ./confluence-2.2-std/plugins/de_DE/src/etc ./confluence-2.2-std/plugins/de_DE/src/etc/atlassian-plugin.xml ./confluence-2.2-std/plugins/de_DE/src/etc/com ./confluence-2.2-std/plugins/de_DE/src/etc/com/atlassian ./confluence-2.2-std/plugins/de_DE/src/etc/com/atlassian/confluence ./confluence-2.2-std/plugins/de_DE/src/etc/com/atlassian/confluence/core ./confluence-2.2-std/plugins/de_DE/src/etc/com/atlassian/confluence/core/ConfluenceActionSupport_de_DE.properties ./confluence-2.2-std/plugins/de_DE/src/etc/templates ./confluence-2.2-std/plugins/de_DE/src/etc/templates/languages ./confluence-2.2-std/plugins/de_DE/src/etc/templates/languages/de_DE ./confluence-2.2-std/plugins/de_DE/src/etc/templates/languages/de_DE/de_DE.gif Language Plugin StructureThe three components of a plugin must be updated for each translation. The following sections describe updating the language plugin descriptor, flag image and ConfluenceActionSupport properties file. Defining The Language Plugin DescriptorThis is an example atlassian-plugin.xml file for a Language Pack plugin for German: <atlassian-plugin name='German language pack' key='confluence.languages.de_DE'> <plugin-info> <description>This plugin contains translations for the German language</description> <vendor name="Atlassian Software Systems" url="http://www.atlassian.com"/> <version>1.0</version> </plugin-info> <language name="German" key="de_DE" language="de" country="DE"> <!-- Define a flag that will be shown for this language --> <resource name="de_DE.gif" type="download" location="templates/languages/de_DE/de_DE.gif"> <property key="content-type" value="image/gif"/> </resource> </language> </atlassian-plugin> Language Plugin Descriptor AttributesThe atlassian-plugin.xml file declares the language being bundled using the following attributes:
These values are based off those defined in the java.util.Locale class. For information on the valid values for the language, country and variant attributes, please see the java.util.Locale documentation. The key attribute is an aggregation of the the three previous attributes, in the same format as that of java.util.Locale: language[_country][_variant] Flag ImagesLanguage packs define a flag that is to be used to represent the language. The atlassian-plugin.xml defines the language property: <resource name="en_AU.gif" type="download" location="templates/languages/en_AU/en_AU.gif"> <property key="content-type" value="image/gif"/> </resource> When selecting a language, the flag defined above will be displayed. Additionally, the flag will appear during the setup process. ConfluenceActionSupport Properties FileThis Java Properties file contains key-value pairs for each string in Confluence, and supports variables. For example: remove.all.name=Remove All
view.mail.thread.desc.full=Entire Thread (Showing {0} of {1})
|
![]() |
Document generated by Confluence on Aug 07, 2008 19:08 |