Page tree

Versions Compared

Key

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

...

Internationalisation (i18n)

 

YC The platform fully supports multi lingual web sites as well as sites in a specific language.

...

Storefront translations are driven by themes. Each theme can provide either fully language specific template or use localisation keys to insert translations for labels and messages from the localisation properly files (the later mechanism is preferred). If theme is only using localisation property files (as is the case with all bundled themes) adding support for new language is as easy as adding a new localisation file.

Shops are independent of themes as any shop can use any theme at any point in time. When configuring the shop it is possible to define theme chain and select enabled languages (note that if shop has selection for language unsupported by theme chain, default language properties file is used). Choice of available languages in the editor is provided by language service which uses 

Textbox
Bodywebapp.i18n.supported.locales
 build configuration that defines the ultimate list of languages to be available on a given YC server. Thus list of languages can be modified by changing this value.

...

Figure 1: Language configuration
 

Label
BodyYCESaaS
Colourinfo
 allows full control over this customisation by allowing to add shop specific theme localisation overrides which can be used either to change some of the labels from the theme's files or even add a completely new translation file.  All that is necessary is to modify value of the attribute with code that represents the required property file name. For example for English translations the attribute with code shop_en.properties.xml will provide overrides for the shop_en.properties.xml for the theme that the shop uses. The values are simple name value pairs which can be limited to only the changes that you need (i.e. only those property keys that are different). 

...

Tip
Detailed instructions on adding a new language are listed in adding new language cookbook.

Data translation

...

Standard localisable properties, such as "name" and "description" can be entered via various data editors which offer language specific data entry (watch admin interface basics workshop). Custom language specific attributes, such as category description 

Textbox
BodyCATEGORY_DESCRIPTION_en
 or language specific images 
Textbox
BodyIMAGE0_en
 can be used to provide language specific values as well. 

Use of these two techniques allows to provide language specific view of all customer facing data. Default theme incorporates these techniques and allows multi lingual display of data as demonstrated on the demo store. YC users are recommended to take advantage of these techniques when creating own themes.

...