Project

General

Profile

Localization » History » Version 10

Hans-Martin Haase, 08/13/2015 08:38 AM
Remove information about number of strings to translate are in a specific message file (Lot of changes since 2012), remove section about the zip with available translations.

1 1 Detlef Hühnlein
h1. Localization Guide
2
3 3 Tobias Wich
h2. Localization Files
4 1 Detlef Hühnlein
5 3 Tobias Wich
All translation files must be located below the folder @openecard_i18n@ plus a component name. The special file Messages.properties is used to provide translated key value pairs. Completely translated files can have any other name. All files must be encoded as UTF-8.
6
7
All translation files follow the same scheme to identify their language. The language is written in the form of "BCP 47":https://tools.ietf.org/html/bcp47 language tags. However instead of -, _ is used as a separator, which is the common practice. This implementation only supports a subset of the BCP 47 specification, meaning only language and country codes are allowed. The default language, which is English is described by C. The name of the file and its language is separated by _. The file ending is optional for arbitrary files.
8
9
The following examples illustrate the scheme.
10
<pre>Messages_C.properties
11
Messages_de.properties
12
Messages_de_DE.properties
13
anyotherfile_C
14
anyotherfile_C.html</pre>
15
16
The implementation tries to find the key in the requested language, then the default language and if nothing is specified at all, a special string in the form of &lt;No translation for key &lt;requested.key&gt;&gt; is returned. The most specific translation is used first as the following list shows.
17
<pre>openecard_i18n/gui/about_de_DE.html
18
openecard_i18n/gui/about_de.html
19
openecard_i18n/gui/about_C.html</pre>
20
21
22
h2. Issues with Editors
23
24
The Netbeans property editor does not write UTF-8 encoded files, but instead ASCII files with Unicode escape sequences. Until a workaround is provided or the issue is fixed, please use another UTF-8 capable editor. In practice that means any editor except Netbeans.
25
26
27
h2. Translator Instructions
28
29 4 Detlef Hühnlein
The translation process is very straightforward. You simply need to 
30
31
# download the current version of the .zip-file at the end of this page
32
# unzip it to some working directory
33 7 Detlef Hühnlein
# browse through the following sub-directories and pick an existing language file (LANG ..._C=english, ..._de=german etc.) of your choice as basis for your translation.
34 1 Detlef Hühnlein
** about
35 10 Hans-Martin Haase
*** about_LANG.html
36
*** feedback_LANG.html
37
*** join_LANG.html
38
*** Messages_LANG.properties
39
** applet - Messages_LANG.properties
40
** eac - Messages_LANG.properties
41
** gui - Messages_LANG.properties
42
** http - Messages_LANG.properties 
43
** pace - Messges_LANG.properties
44
** richclient - Messages_LANG.properties
45 1 Detlef Hühnlein
# copy each file to some _OTHERLANG 
46 3 Tobias Wich
# translate the corresponding text and expressions
47
# zip the result and upload it again or mail it to info@openecard.org