OpenbravoPOS Localization
| Languages: |
English | 中文 | 中文(中国大陆) | Translate this article... |
Contents |
Introduction
Openbravo POS is designed with localization in mind. all the releases of Openbravo POS are developed in English to allow to be used for as much as possible people around the world. It takes advantage of all the current localization features the Java platform includes that allows to change the localization of all the application elements to the chosen locale: reports, messages, dialogs, labels, formats for numeric values, dates and currencies.
If the translation of the labels, and messages is not available for the desired language it is very easy create the files with the translations to a new language and also is very easy to add these files to a production environment of Openbravo POS without having to recompile the application or executing complex processes.
This document contains some guidelines on how to localize Openbravo POS to a new language and also keeps track of the current localization projects. This document refers to Openbravo POS 2.10 and later versions.
Select the localization of Openbravo POS
All the localization properties of Openbravo POS are available in the configuration panel under the Localization section.
The first option defines the locale of the application. This option shows all the locales available for the java platform. If (System default) is selected then the operating system configuration properties are selected.
The rest of the options define the pattern used to format all the values by type. If (Default) is selected then the defined pattern for the selected locale is chosen. However you can overwrite the pattern and select the format you want Openbravo POS to use.
For numeric values the pattern syntax used is documented in DecimalFormat Java API.
For date and time values the pattern syntax used is documented in SimpleDateFormat Java API.
For example if you want to display currency values with the $ symbol leading the ammount, group every three digits and display two decimal numbers, use the pattern "$ #,##0.##".
Localizing Openbravo POS
Openbravo POS uses the localization support included in the Java platform and all the messages to translate are stored in properties files. An introduction about how to internationalize a java application can be found in Java Tutorial Internationalization.
The files that need to be translated for the application are the following ones:
locales/beans_messages.properties locales/data_messages.properties locales/erp_messages.properties locales/jasper_messages.properties locales/pos_messages.properties
And the files that need to be translated for the reports and charts included are:
reports/com/openbravo/com/chartsales_messages.properties reports/com/openbravo/com/closedpos_messages.properties reports/com/openbravo/com/closedproducts_messages.properties reports/com/openbravo/com/customers_messages.properties reports/com/openbravo/com/inventory_messages.properties reports/com/openbravo/com/inventoryb_messages.properties reports/com/openbravo/com/inventorydiff_messages.properties reports/com/openbravo/com/people_messages.properties reports/com/openbravo/com/productlabels_messages.properties reports/com/openbravo/com/products_messages.properties reports/com/openbravo/com/productsales_messages.properties reports/com/openbravo/com/productscatalog_messages.properties reports/com/openbravo/com/taxes_messages.properties reports/com/openbravo/com/usersales_messages.properties
To create a new translation you only need to copy all these files and rename it using the naming convention that distinguishes one localization from the others. For example, the Spanish version of the pos_messages.properties file should be renamed to pos_messages_es.properties and the Spanish version of Argentina should be renamed to pos_messages_es_AR.properties. An explanation of how these locales are formed are in the article Java Internationalization: Localization with ResourceBundles. And the available locales for java are in Java supported locales
Properties files are encoded using the ISO 8859-1 character encoding and the characters that cannot be directly represented in this encoding, Unicode escapes are used.
For example to localize Openbravo POS to Spanish, the language the code is es and the files will be called as follows:
locales/beans_messages_es.properties locales/data_messages_es.properties locales/erp_messages_es.properties locales/jasper_messages_es.properties locales/pos_messages_es.properties
reports/com/openbravo/com/chartsales_messages_es.properties reports/com/openbravo/com/closedpos_messages_es.properties reports/com/openbravo/com/closedproducts_messages_es.properties reports/com/openbravo/com/customers_messages_es.properties reports/com/openbravo/com/inventory_messages_es.properties reports/com/openbravo/com/inventoryb_messages_es.properties reports/com/openbravo/com/inventorydiff_messages_es.properties reports/com/openbravo/com/people_messages_es.properties reports/com/openbravo/com/productlabels_messages_es.properties reports/com/openbravo/com/products_messages_es.properties reports/com/openbravo/com/productsales_messages_es.properties reports/com/openbravo/com/productscatalog_messages_es.properties reports/com/openbravo/com/taxes_messages_es.properties reports/com/openbravo/com/usersales_messages_es.properties
Using Netbeans to localize Openbravo POS
Netbeans has a localization tool that can be used to localize easily Openbravo POS. You do not need the sources to localize Openbravo POS, you only need the *.properties files of the locales folder. With Netbeans you only need to create a new java project that contains only this folder to localize Openbravo POS. You can follow the OpenbravoPOS Developer guide to create a new Netbeans project.
To edit an Openbravo POS *.properties file, select the file in the project view, open the contextual menu and select Open. An editor will appear where you can edit the sentences.
If you want to add a new language to a *.properties file, select the file, open the contextual menu and select Add Locale.... A new dialog will appear where you can select a new localization.
How to install a new localization package
A localization package is just a collection of *.properties files like described in the previous paragraph. To install it you have to copy these files into the folders locales and reports of an Openbravo POS installation. Start Openbravo POS and go to the configuration panel and in the locale section select the locale corresponding to the collection of *.properties files. Save the configuration properties and re-start Openbravo POS.
Current localization projects
Openbravo POS 2.00 includes the following translations as part of the product:
| Country | Translator | Language code | Update for version | Available from |
|---|---|---|---|---|
| Spain | Adrián Romero <aro at openbravo.com> | es | R2.10 | Included in the product |
| English | Adrián Romero <aro at openbravo.com> | en | R2.10 | Included in the product |
| Galician | Mancomun.org | gl | R2.10 | Included in the product |
| French | Henri Azar | fr | R2.00 | Available from Tracker |
| Dutch | paul1011, Anton Delaruelle | nl | R2.10 | Available from Tracker |
| Russian | Project OpenBravo POS RU | ru | R2.10 | Available from WebSVN |
| German | Sebastian Muszytowski | de | R2.10 | Available from Tracker & WebSVN |
| Brazilian | Sergio Carbonete | pt_BR | R2.00 | Available from Tracker |
All the translations included in the product are available at Openbravo POS Subversion source code repository.
New localizations
Please, if you do a new translation, summit it using the Openbravo POS tracker system. Attach the localized files as part of the issue report.
Category: OpenbravoPOS




