Project

General

Profile

Localization » History » Version 13

Hans-Martin Haase, 08/20/2015 11:26 AM
Fix some typos.

1 11 Hans-Martin Haase
{{toc}}
2
3 1 Detlef Hühnlein
h1. Localization Guide
4
5 12 Hans-Martin Haase
This first section is intended to provide information how internationalization is managed in the Open eCard App. If you are a translator willing to contribute an translation see [[Localization#How to translate the Open eCard App?|here]].
6
7 3 Tobias Wich
h2. Localization Files
8 1 Detlef Hühnlein
9 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.
10
11
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.
12
13
The following examples illustrate the scheme.
14
<pre>Messages_C.properties
15
Messages_de.properties
16
Messages_de_DE.properties
17
anyotherfile_C
18
anyotherfile_C.html</pre>
19
20
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.
21
<pre>openecard_i18n/gui/about_de_DE.html
22
openecard_i18n/gui/about_de.html
23
openecard_i18n/gui/about_C.html</pre>
24
25
26
h2. Issues with Editors
27
28
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.
29 1 Detlef Hühnlein
30
31 12 Hans-Martin Haase
h1. How to translate the Open eCard App?
32 10 Hans-Martin Haase
33 13 Hans-Martin Haase
The Open eCard Project uses the translation service of "Transifex":https://www.transifex.com/ which is an online tool for translations. If you want to contribute a translation for your language, sign up or login on "Transifex":https://www.transifex.com/ and request member ship for your language on the "Open eCard Project page":https://www.transifex.com/detlef.huehnlein/open-ecard/ there. As soon as your are accepted you may start with the translation process.
34 3 Tobias Wich
35 11 Hans-Martin Haase
The usage of the online service has the advantages that you don't have to care about file format and encoding. The translation process is done with the online editor and you may easily save the translation there and it is integrated afterwards, no need to send them via e-mail or commit it into the git repository.