Confluence 2.5 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
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 Overview
Language plugins are placed in the <CONFLUENCE-INSTALL-DIRECTORY>/languages/<KEY>
directory, where <KEY>
is the international language identifier. They consist of three files:
名前 |
目的 |
ファイル名 |
場所 |
---|---|---|---|
Language Plugin Descriptor |
Defines language settings in |
|
|
ConfluenceActionSupport Properties File |
Contains text strings in |
|
|
Flag Image |
Contains flag image for country |
|
|
Directory Structure
The 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.xmlc
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 Structure
The 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 Descriptor
This 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 Attributes
The atlassian-plugin.xml
file declares the language being bundled using the following attributes:
属性 |
説明 |
必須 |
---|---|---|
language |
The language being defined |
はい |
国 |
The country the language belongs to |
いいえ |
variant |
The variant of the language |
いいえ |
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 Images
Language 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 File
This 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})