Path

7x / documentation / ez publish / technical manual / 3.9 / features / multi-language / translatable country names


Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

Translatable country names

From 3.9, it is possible to translate the names of countries to different languages. For example, you can instruct the system to use "Frankrike" instead of "France" and "Norge" instead of "Norway" whenever the list of countries is displayed on a siteaccess where Norwegian locale is used. The following example demonstrates how this can be done.

Example

If you wish to replace the English country names of France and Norway with the Norwegian ones on a siteaccess that uses the Norwegian locale, you can do the following.

  1. Go to the "share/locale" directory and copy the "nor-NO.ini" configuration file to a new file called "nor-NO@custom.ini".
  2. Add the following lines under the "[RegionalSettings]" block:
    [CountryNames]
    Countries[]
    Countries[FR]=Frankrike
    Countries[NO]=Norge
    
  3. Set your site locale to "nor-NO@custom" (refer to the "Configuring your site locale" documentation page for more information about setting the site locale).

After clearing the caches, the system will use Norwegian country names for France and Norway whenever the list of countries is displayed. The following screenshot shows how a translated country name will appear in the "Default selection" drop-down list when an attribute of the "ezcountry" datatype is being edited.

List of countries containing translated country names

List of countries containing translated country names.

Julia Shymova (15/06/2007 9:22 am)

Balazs Halasy (19/06/2007 6:00 pm)

Julia Shymova, Balazs Halasy


Comments

There are no comments.