Access to add and change pages is restricted. See: https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

 W.I.P.

Guide to OFBiz-i18n, Internationalisation of OFBiz

Looking around the WIKI there are few hints (and even less concrete guides) towards what needs to be done in order to add more locales to an OFBiz setup, namely the current release or SVN trunk.

Most generally, there are three areas of concern when starting a translation of OFBiz into a different locale, i.e. a language and possibly a specific sub-locale:

  • Translation of Application labels
  • Translation of OFBiz assets with built-in i18n options (Catalog, Product)
  • Translation of Text Elements (DataResources) using CMS

However, i18n goes even beyond that as there is a clear (natural) preference for US standards-based demo data, e.g. in the area of PaymentGateways, ShippingInterfaces and Accounting in general (tax allocation, general ledger configuration). Hence a fourth section tries to address these areas:

  • Re-configuration of General Ledger 
  • Tax configuration
  • Extension of GeoData

Note that this document focusses on the CONFIGURATION of OFBiz Entities in order to display Text in a different Locale and possibly pay attention to different Legislation & Taxing in other Locales. This document does NOT aim to talk about technical localisation (Tech Folks, make sure you start at Adrian's Internationalization) or adding more local payment or shipping gateways, as t his is considered regular customisation.

A final section covers tools that can be used for the translations tasks and documents present in this wiki which refer to translations.

Translation of Application labels

The labels for the OFBiz GUI applications are the most evident part to change for an i18n project. They are part of the release and serve the purpose of 'resource packs' known from claqssic Java development.

Also refer to Tips for UI labels translation.

Location of config files

located in the configuration subdirectories as follows:OFBIZ_HOME/applications/<appname>/config

OFBIZ_HOME/framework/<appname>/config

OFBIZ_HOME/specialpurpose/<appname>/config

The naming convention is <appname>UiLabels.xml.

Most likely there will also be <appname>HelpUiLabels.xml, <appname>EntityLabels.xml and possibly other files there. Just check through an see what merits your translation.

Activation

 The activation of changed configuration files is easy: Restart the OFBiz application. These configuration files are read in every time the OFBiz application container starts. Hence: Edit > Save > Restart > Use is the activation sequence.

References to other Wiki Documents

Interested to understand how you make references to the i18n labels in code? Then read this: Text Translation.

Translation of OFBiz assets with built-in i18n options


This section assumes you have understood the relationship of Content, ContentAssociations and DataResources. Also, you should understand how a DataResource can be provided to the system.





Some OFBiz entities have built-in i18n options (Catalog, Product). Check out how to translate Products or Categories Name and Descriptions, have a look at How to localize Product and Categories descriptions.

You can find out which entities provide this option when searching for "*Content" in the entitydef configuration files (which will then list out all occurences of a <entityname>Content entity.
Most typically, the entity.name, entity.description and entity.longdescription attributes cna be internationalized. Note that by default, the entity.description entries are also used as in HTML HEAD META type="keyword" tags, so using this can help you with localized Search Engine Optimisation projects.
NOTE: When using i18n on these entities, the "direct" attributes must be empty, otherwise the CMS lookup will not occur.
MORE TO COME SOON (worked example)

Translation of Text Elements using the CMS


This section assumes you have understood the relationship of Content, ContentAssociations and DataResources. Also, you should understand how a DataResource can be provided to the system.







Tools and Documents in this WIKI

Some language communities have started common dictionaries in order to align translation options and agree on some special terms. Examples are:

  • No labels