Adding Languages and Locales to the afm-config.xml File

You need to add the language and locales for which you have translations to the \WEB-INF\config\context\compatibility\afm-config.xml, and then restart the application server. First find the following section of the afm-config.xml file:

<locales>

<inherit />

<locale name="fr_FR" dotnetName="fr-FR" />

<locale name="en_AU" dotnetName="en-AU" />

<locale name="en_CA" dotnetName="en-CA" />

<locale name="en_GB" dotnetName="en-GB" />

<locale name="en_US" dotnetName="en-US" />

<locale name="fr_CA" dotnetName="fr-CA" />

<locale name="ar_SA" dotnetName="ar-SA" />

- <!-- Simplified Chinese

-->

<locale name="zh_CN" dotnetName="zh-Hans" />

- <!-- Traditional Chinese

-->

<locale name="zh_TW" dotnetName="zh-Hant" />

<locale name="nl_NL" dotnetName="nl-NL" />

<locale name="no_NO" dotnetName="nb-NO" />

<locale name="de_DE" dotnetName="de-DE" />

<locale name="iw_IL" dotnetName="he-IL" />

<locale name="it_IT" dotnetName="it-IT" />

<locale name="ja_JP" dotnetName="ja-JP" />

<locale name="ko_KR" dotnetName="ko-KR" />

<locale name="pt_BR" dotnetName="pt-BR" />

<locale name="es_ES" dotnetName="es-ES" />

</locales>

If your locale name does not appear in this list, then add it to this section. For example, Portuguese is not in the list; to include it, you would add:

<locale name="pt_BR" dotnetName="pt-BR" />

You need to add the value for the language to the next section:

<languages>

<inherit/>

<language isoLanguage="en" enabled="true" dbExtension="" />

<language isoLanguage="fr" enabled="true" dbExtension="fr" />

<language isoLanguage="de" enabled="true" dbExtension="de" />

<language isoLanguage="ja" enabled="false" dbExtension="jp" />

<language isoLanguage="it" enabled="false" dbExtension="it" />

<language isoLanguage="nl" enabled="true" dbExtension="nl" />

<language isoLanguage="no" enabled="true" dbExtension="no" />

<language isoLanguage="zh" localeName="zh_CN" enabled="true" dbExtension="ch" />

<language isoLanguage="zh" localeName="zh_TW" enabled="true" dbExtension="zh" />

<language isoLanguage="es" enabled="true" dbExtension="es" />

<language isoLanguage="ko" enabled="true" dbExtension="ko" />

</languages>

For example, to add Portuguese, you would add the following:

<language isoLanguage="pt" enabled="true" dbExtension="01" />

You will need to use the two-letter string for isoLanguage before the underscore character of the locale name.

For the dbExtension, you can use either 01, 02 or 03. The dbExtension corresponds to the 'Language to Field Mapping' field in the lang_lang table.

If there is the same isoLanguage value, then you will have to add the localeName attribute. For this example, refer to Simplified and Chinese setup:

<language isoLanguage="zh" localeName="zh_CN" enabled="true" dbExtension="ch" />

<language isoLanguage="zh" localeName="zh_TW" enabled="true" dbExtension="zh" />

In this case, use the same isoLanguage code, but use the full locale name for the localeName attribute field.

Setting Up a New Language

Below are the steps to setting up a new language. In this example, the language is Estonian:

  1. In afm-config.xml, under the <locales> section, add: <local name=”et_EE” dotnetName=”et-EE”/>
  2. In afm-config.xml, under the <languages> section, add: <language isoLanguage=”et” enabled=”true” dbExtension=”01” helpExtension=”ee”/>, assuming that you are mapping to the 01 dbExtension. Possible values for the dbExtension are “01”, “02”, or “03”.
  3. In afm-config.xsd, add:
  1. In localeStrings.xsd, add: <xs:enumeration value=”et_EE”/> to: localeNamesType.
  2. In afm_flds table, add ;et_EE;Estonian to the enumeration list in the locale field of the afm_users table.
  3. In the “My Profile”section of WebCentral, set the locale to use: Estonian.

When you add the locale to the enumerated value list for the ARCHIBUS Users table Locale field (afm_flds.enum definition for afm_users.locale field), the locale will be available in the ARCHIBUS Edit Users view, so you can assign it to new and existing user account records.

Be sure to enable the language for this locale in the afm-config.xml file (Please see: ARCHIBUS Configuration Options). Otherwise, users will not be able to select this locale in their My Profile form. Also otherwise, should you as the system administrator assign this new locale to a user, their locale will default to English (us_EN).