Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


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:

  • applications / order --> OrderContent
  • applications / party --> PartyContent
  • applications / party --> CommunicationsEventContent
  • applications / product --> ProductCategoryContent
  • applications / product --> ProductConfigurationItemContent
  • applications / product --> ProductContent
  • applications / workeffort --> WorkEffortContent

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.

Panel
titleNOTE

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


Panel
bgColor#FFFFCE
titleBGColor#F7D6C1
titleTIP

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 etc 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!).
     
    Panel
    bgColor#FFFFCE
    titleBGColor#F7D6C1
    titleTIP

    By default, the productContent.description entries are also used in <HTML><HEAD>...<META type="keyword" ...> tags, so using this can help you with localized Search Engine Optimisation projects.


MORE TO COME SOON (worked example)

...