Project

General

Profile

Localization » History » Revision 11

Revision 10 (Hans-Martin Haase, 08/13/2015 08:38 AM) → Revision 11/13 (Hans-Martin Haase, 08/13/2015 09:27 AM)

{{toc}} 

 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. How to translate the Open eCard App? Translator Instructions 

 The Open eCard Project uses the translation service of "Transifex":https://www.transifex.com/ which process is an online tool for translations. If you want very straightforward. You simply need to contribute a translation for your language  

 # 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 sign up or login on "Transifex":https://www.transifex.com/ pick an request member ship for existing language file (LANG ..._C=english, ..._de=german etc.) of your language on the "Open eCard Project page":https://www.transifex.com/detlef.huehnlein/open-ecard/ there. As soon choice as basis for your are accepted you may start with the translation process. 

 The usage of the online service has the advantages that you don't have to care translation. 
 ** about 
 *** about_LANG.html 
 *** feedback_LANG.html 
 *** join_LANG.html 
 *** Messages_LANG.properties 
 ** applet - Messages_LANG.properties 
 ** eac - Messages_LANG.properties 
 ** gui - Messages_LANG.properties 
 ** http - Messages_LANG.properties  
 ** pace - Messges_LANG.properties 
 ** richclient - Messages_LANG.properties 
 # copy each file format and encoding. The translation process is done with to some _OTHERLANG  
 # translate the online editor corresponding text and you may easily save expressions 
 # zip the translation there result and upload it is integrated afterwards, no need to send them via e-mail again or commit mail it into the git repository. 

 to info@openecard.org