Project

General

Profile

Localization » History » Revision 8

Revision 7 (Detlef Hühnlein, 10/28/2012 09:47 PM) → Revision 8/13 (Detlef Hühnlein, 10/28/2012 09:48 PM)

h1. Localization Guide 

 h2. Localization Files 

 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. 

 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. 

 The following examples illustrate the scheme. 
 <pre>Messages_C.properties 
 Messages_de.properties 
 Messages_de_DE.properties 
 anyotherfile_C 
 anyotherfile_C.html</pre> 

 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. 
 <pre>openecard_i18n/gui/about_de_DE.html 
 openecard_i18n/gui/about_de.html 
 openecard_i18n/gui/about_C.html</pre> 


 h2. Issues with Editors 

 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. 


 h2. Translator Instructions 

 The translation process is very straightforward. You simply need to  

 # download the current version of the .zip-file at the end of this page 
 # unzip it to some working directory 
 # 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. 
 ** about 
 *** about_LANG.html (4 lines) 
 *** feedback_LANG.html (3 lines) 
 *** join_LANG.html (2 lines) 
 *** Messages_LANG.properties (7 expressions) 
 ** applet - Messages_LANG.properties (3 expressions) 
 ** eac - Messages_LANG.properties (50 expressions) 
 ** gui - Messages_LANG.properties (4 expressions) 
 ** http - Messages_LANG.properties (9 expressions) lines)  
 ** pace - Messges_LANG.properties (7 expressions) 
 ** richclient - Messages_LANG.properties (12 expressions) 

 h1. Existing Localizations 

 The current available localization files are provided as a zip file at the end of this page.