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

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

The following are the steps to set up a new language.

Step 1: Find the <locales> section of the afm-config.xml file and add your locale name to it

<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" />

Step 2: Add the value for the language to the <languages> 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.

Note: Be sure to enable the language for this locale in the afm-config.xml file. (See: Archibus Configuration Options.) Otherwise, users will not be able to select this locale in their My Profile form. Also, be aware that if the language is not enabled, and you as the system administrator assign this new locale to a user, their locale will default to English (us_EN).

See the following section for the additional steps for setting up a new language.

Further steps

After following steps 1 and 2 above, follow these steps to set up a new language. In the below procedure, Estonian is used as an example.

  1. In \schema\ab-system\xsd\afm-config.xsd, add:
  2. In locale-strings.xsd, add: <xs:enumeration value=”et_EE”/> to: localeNamesType.
  3. In afm_flds table, add ;et_EE;Estonian to the enumeration list in the locale field of the afm_users table.

    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 "Edit Users" view, so that you can assign it to new and existing user account records.

  4. In the afm_users table, set the locale to "Estonia." Alternately, in the “My Profile” section of Web Central, set the locale to use: Estonian.
  5. Start/restart the web server.

    Note: After creating new translated files (*.lang), you must restart the web server in order to acknowledge the new translations.