Translating Openbravo Oracle 1.1
Translating Openbravo Oracle 1.1
Revision 1.1
Visit us at www.openbravo.com
Table of Contents
I. Introduction........................................................................................................................ 3
II. Creating a Language........................................................................................................ 4
III. Language Pack............................................................................................................... 6
I.1 Structure..................................................................................................................... 6
I.2 Export/Import.............................................................................................................. 9
IV. Maintaining a Translation.............................................................................................. 10
V. Compiling Openbravo.................................................................................................... 11
Here the language of choice may be selected from the list (if the user is not at
relation view, he or she should click the relation button ) or created ( ). If a
new language is going to be created it should follow the Java convention of
country and language: the language with 2 lower letters followed by an underscore
(_) and the country as 2 capital letters (e.g. fr_CN would stand for Canadian
French). By checking the System Language box, the user actives the language to
translate and from this point, it will then appear in the login window (where the
user signed in as a System Administrator).
The next step is to copy all text from the Base Language to the new language.
The base language is the language that is used as almost a starting point for
translating the application, and it is English (en_US). By clicking on the Verify
I.1 Structure
A language pack is a set of XML files containing the translations for a desired
language. Each file contains the translation for a single table in the database and
is given the same name as the table which contains its corresponding translation.
These language packs are stored in a server directory by language using the
convention of language and country (e.g. en_US, es_ES...). They are inside a
lang directory in the folder that is defined to contain all attachments. This is
defined at web.xml file, is requested during the installation process, and by default
is /AppsAttachment. An example of a complete path for Spanish/Spain could be
/AppsAttachment/lang/es_ES.
The structure of the XML is as follows:
A tag containing the table and the language names.
For each row in the table there will be a row tag width attributes id for the
row identification and trl which will be Y or N depending on whether or not it
has been translated.
Inside the row tag, there is a value tag for each column in the table. This tag
includes the attributes column for the column name and original signifying
the value for the column in the base language (English). The value for the
tag will contain the translated text. This is the text that you have to
change if you want to make a translation.
The following piece of code is an example for the file:
/AppsAttachment/lang/es_ES/AD_TASK.xml:
The complete list of xml files that compose a language pack called lg_CT, where
lg stands for language and CT for country, is:
Here the user can choose one of the languages defined as System Language.
Export: This will create the language directory (see above) if it does not
already exist and export files for the selected language to the directory.
Import: This will take the files from the selected language directory and
import them into the application tables.
To compile this must be typed into the console from application root directory :
ant compile.complete
This process will compile and translate every window at the application.
Once everything is compiled, the user must restart the web server. Following
the previous example, the following would be typed in:
service tomcat start