Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

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.

...

Also refer to Tips for UI labels translation.

Info

Some POS labels are handled by XUI not OFBIz. You can use a plugin like RBE to edit those XuiLabels.properties

Location of config files

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

...

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

Panel

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, the most prominent (and evident) are Catalog-Categories and 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 entitymodel.xml configuration files (which will then list out all occurencies of a <entityname>Content entity). Search in the current trunk (rev 811440) resulted in the following Content-Entities:

...

Most typically, the entity.name, entity.description and entity.longdescription attributes can be internationalized. A table listing the i18n options of respective entity attributes will be worked in here soon.Note that by default, the productContent.description entries are also used

Note
titleBe Careful

When using i18n on these entities, the "direct" attributes must be empty, otherwise the CMS lookup will not occur.

Tip
titleNaming Conventions for ContentId and DataSourceId

Each of your Content and DataSource items will need a unique ID, so make up your mind about naming conventions for the ContentId and DatasourceId that are related to your entities!

ProductContent special remarks

The ProductContent entity will be the most interesting one for ecommerces since working on the product descriptions will be the most of an online editor's work. Also customizing text for different locales when you run a multi-locale shop will be a huge task. Best results are achieved when an XML template is used that defines all relevant entities for a new product (make sure you use a single XML per single product).
Aside the regular relationships of a given product (configuration elements, category placement etc.), the i18n content elements should be added with the same XML. Then at least a template CMS structure will be present with each product that is uploaded.
Unfortunately the Demo data just places rudimentary i18n. The relevant attributes to i18n on a Product are:

  • Product.name
  • Product.description
  • Product.longDescription

The corresponding relationships are built using the ProductContent entity where the productContentTypeId should be set to 'NAME', 'DESCRIPTION' or 'LONG_DESCRIPTION' for the content  that will map to name, description or longDescription respectively (attention, the Demo Data does not define the LONG_DESCRIPTION content items, so you will need to touch this, sorry!).
 

Info
titleHTML META tags for default Product-pages

The content of HTML Meta tags on product pages are handled in

Code Block
applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy

The following content will be handled as i18n content, i.e. locale/fallback locale applies in <HTML><HEAD>...<META type="keyword" ...> tags

...

:

  • product.name (content items mapped as "PRODUCT_NAME" type)
  • catalog.name (not i18n)
  • productCategory.description (content items mapped as "DESCRIPTION" to all categories that this product is a member of)

The following content will be handled as i18n content, i.e. locale/fallback locale applies in <HTML><HEAD>...<META type="description" ...> tags:

  • product.description (content items mapped as "DESCRIPTION" type)

Using this will help you with localized SEO (=Search Engine Optimisation) projects.

...

MORE TO COME SOON (worked example)

Translation of Text Elements using the CMS

Panel

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.

w.i.p

Beyond Translation

As mentioned earlier, certain elements of i18n go beyond text translation. These elements typically comprise regionalized rules (e.g. for tax calculation) or entity instances (e.g. for general ledger). This section will discuss some general items in this.

Re-configuration of General Ledger

Actually, reconfiguring GL is a big step and dives deep into the data configuration of the Accounting module.
First of all, an understanding is required as to which of the accounting data entities require either customizations (changes that are related to the ORGANIZATION party that is using the GL) or localizations (changes that are related to the primary market that the ORGANIZATION is working in).

Panel

The requirements to provide a standard way of localizing General Ledger are also tracked on JIRA OFBIZ-3411 Introduce Localization Packages in General Ledger.

The following list shows all Entities that are defined in the files on OFBIZ_HOME/applications/accounting/data sorted by filename and then by occurence in the data files:

Filename

Entity

data character

relevant for

AccountingSecurityData(.xml)

SecurityPermission

seed

 

SecurityGroupPermission

seed

AccountingTypeData(.xml)

AcctgTransType

seed

 

StatusType, StatusItems ACCTG_ENREC_STATUS

seed

 

BudgetItemType

cust

 

BudgetItem

cust

 

EnumerationType, Enumeration GC_FULFILL

seed

 

EnumerationType, Enumeration PGT_CODE

seed

 

EnumerationType, Enumeration FARP_TYPE

seed

 

EnumerationType, Enumeration FARP_METHOD

seed

 

FinAccountTransType

seed

 

FinAccountType

seed

 

StatusType, StatusItems, StatusValidChange FINACCT_STATUS

seed

 

StatusType, StatusItems, StatusValidChange FINACCT_TRNS_STATUS

seed

 

EnumerationType, Enumeration FINACCT_TRANS_REASON

seed

 

FixedAssetType

demo

 

EnumerationType, Enumeration FXAST_CLASS

demo

 

EnumerationType, Enumeration FXAST_COMPU_HARDWARE

demo

 

EnumerationType, Enumeration FXAST_COMPU_SOFTWARE

demo

 

FixedAssetIdentType

demo

 

StatusType, StatusItems FIXEDAST_MNT_STATUS

demo

 

Scheduled Job, Roles for Fixed Assets

demo

 

FixedAssetProductType

demo

 

GlAccountClass

demo

 

GlAccountType

demo

 

GlResourceType

demo

 

GlXbrlClass

demo

 

GlFiscalType

demo

localize

 

GlAccountCategoryType

demo

 

InvoiceItemType

seed

 

InvoiceItemAssocType

demo

 

InvoiceType

demo

 

InvoiceItemTypeMap

demo

 

EnumerationType, Enumeration TAXABLE_INV_ITM_TY

demo

 

PaymentMethodType

seed

localize?

 

PaymentType

seed

localize

 

PaymentGroupType

seed

localize

 

PaymentGatewayConfigType

demo

 

PaymentGatewayConfig

demo

 

PaymentGateway<PROVIDER>

demo

 

CustomMethodType, CustomMethod

seed

 

EnumerationType, Enumeration CREDIT_CARD_TYPE

seed

 

StatusType BUDGET_STATUS

seed

 

StatusType PARTY_ASSET_STATUS

seed

 

StatusType, StatusItems, StatusValidChange INVOICE_STATUS

seed

 

StatusType, StatusItems, StatusValidChange PMNT_STATUS

seed

 

SettlementTerm

demo

 

EnumerationType, Enumeration TAX_FORMS

demo

localize

 

EnumerationType, Enumeration COGS_METHODS

seed

 

EnumerationType, Enumeration INVOICE_SEQ_MD

seed

 

FixedAssetStdCostType

seed

 

TaxAuthorityAssocType

demo

localize

 

TaxAuthorityRateType

demo

localize

 

RateType

seed

 

PeriodType

seed

 

WebSite

seed

 

EnumerationType, Enumeration PTSOFTTFR

seed

 

ProductAverageCostType

demo

 

EnumerationType, Enumeration STR_CRDT_ACT

demo

 

StatusType, StatusItems, StatusValidChange GLREC_STATUS

demo

DemoFinAccountData.xml

FinAccount

cust

 

FinAccountStatus

cust

 

FinAccountTrans

demo

 

Payment

demo

DemoGeneralChartOfAccounts.xml

GlAccount

demo

DemoGlSetupData.xml

InvoiceItemType

seed

 

PaymentMethodType

seed

 

CostComponentCalc

cust

 

GlJournal

cust

 

PartyAcctgPreference

seed

 

GlAccountOrganization

seed

 

GlAccountTypeDefault

seed

 

GlAccountCategory

seed

 

PaymentGlAccountTypeMap

seed

 

PaymentMethodsTypeGlAccount

seed

 

CreditCardTypeGlAccount

seed

 

FinAccountTypeGlAccount

seed

 

VarianceReasonGlAccount

seed

 

CustomTimePeriod

demo

 

UomConversionDated

demo

 

GlReconciliation

demo

 

GlAccountCategoryMember

demo

DemoOrganisationData.xml

/any org data for accounting/

demo

PaymentsInvoices.xml

/Example Invoices/

demo

UsTaxAccountGroups.xml

GlAccountGroupType

demo

localize

 

GlAccountGroup

demo

localize

Tax configuration

w.i.p.

Tools and Documents in this WIKI

...