Translate the Standard Applications and Core into a New Language
Translate the Standard Applications and Core into a New Language
To translate the standard Archibus applications and the core into a new language, use the following procedure.
-
Add the new language:
Ensure that the new language is in to the \WEB-INF\config\context\compatibility\afm-config . xml file, and add a record for the language to the Languages table. See Editing the Languages Table and Adding the Language and Locale to the afm-config.xml File . -
Read the translatable tables
.
- Select the System / Localization Manager / Read or Write Translatable Tables task.
- Select the language you are translating to from the Languages list.
- Keep the selections for all the check boxes for the tables to include (schema, Navigator, and other tables).
-
Click Read Tables.
The translatable strings that appear in the translatable tables in the project database are read into the localization tables.
-
Read the Translatable Files.
Read the strings from the translatable files into the localization tables. To do so:- Select the System / Localization Manager / Read or Write Translatable Files task.
-
Make the following selections:
- Select the language you are translating to from the Languages list.
- Select to Include All Applications.
- By default, all selections are checked for the Files to Include check boxes. Keep these selections when translating the standard application.
- By default, the Include Core Files check box is selected when you are translating all applications. Keep this selection, as you need to translate the core to have a complete translation.
-
Click Read Files.
After reading these strings, the localization tables have all strings in the software.
Note : In order to avoid a long time delay when running the Read Translatable Files option, run the \webapp\projects\users\public\dt\25.2.002\schema\sysadmin\update_schema.duw , which adds indexes. See Database Schema Revision History .
-
Enter translations by exporting the strings
.
A common step is to export the localization tables to Excel, so that they can be sent to a professional translator for the first-pass translation. This step is useful when working with external translation houses, as their translation software (for example, Trados) can work directly on the Excel file, automatically translate duplicates, and make use of any translation memory created in previous translation rounds.- Select the System / Localization Manager / Export or Import Localization Extract File task.
- Select the language you are translating to from the Language list.
- Keep the selections to Export All Strings, and to export to Excel format.
-
Click Export Extract Files.
When the export is completed, the screen shows the path for the lang_enum.xls, lang_strings.xls, and the lang_files.xls. The files names begin with the ISO Code for the language you are translating to.
Note : When translating strings, you should keep in mind that length of a translated string should be no more than 1.5 times the length of the English string. This ensures that the size of the translated string does not exceed the field length. When the translation is written back to the database, the greeking process generates an error if the translation is longer than the field length. You can then adjust the specific translations.
-
Import the translated strings.
The next step is to import the translated strings back into the localization tables. Do the following.- Select the System / Localization Manager / Export or Import Localization Extract Files task.
- Click the Import or Compare Extract Files button.
- On the Transfer Action tab, keep the selection for Transfer In and click Continue.
- Use the Browse button to locate the extract file that contains the translated strings. Optionally, you can select to include a Comparison report.
-
Click Begin Transfer.
The import begins and/or the Comparison report is generated. The Transfer Progress tab shows the progress of the import. When the import is completed, the URLs for the Comparison reports (Update, Insert, and Error logs if there are any errors) appear in the bottom section of the screen. You can right-click the URL and select Save Target As to save the file to your local drive. Or, select the URL and choose to open or save the file.
-
Write the translatable tables and files
.
Write the strings back to the translatable tables, and write the lang and .js files for Web Central.- Select the System / Localization Manager / Read or Write Translatable Tables task, using all the selections you made when reading the tables in step 2, but this time click Write Tables.
- Select the System / Localization Manager / Read or Write Translatable Files task, using all the selections you made when reading the files in step 3, but this time clicking Write Files.
-
Restart the application server
.
After generating the translated lang files, you should stop and start the application server to use the translations.
Note on Automatic ID Lookup Fields
Translatable lookup fields are supported in grids, reports, charts, and cross-tables, but are not supported in edit forms. If a translatable lookup field such as project.project_type is used in an edit form, and the user has a non-default locale, the form will fail to save data. This is because the user may enter or select a localized field value, which will not validate against the primary key of the lookup table. The solution is to use a description lookup field instead of a primary key lookup field.
For example, to translate the
project.project_type
field:
1. Remove the
<root><lookup displayType="translate"/> </root>
element from the
projecttype.project_type
field in the afm_flds table.
2. Add the
<root><lookup/> </root>
element, without the translatable attribute, to the
projecttype.description
field in the afm_flds table.
Edit forms will then:
-
Display editable English value of the
project.project_type
field. -
Save English value of the
project.project_type
field, which validates without errors. -
Display read-only localized value of the
projecttype.description
field.