Default language.

Localizing a Progressive Web Application


BMC provides a localization toolkit in  to localize your  applications from English to other supported locales. Use the localization toolkit and the AR System Message Catalog form to localize your Progressive Web Application (PWA).

The localization toolkit is used to extract the localizable strings from the objects. After extracting, export the strings to a Tab Separated Values (TSV) file, translate the strings and import the translated strings into the AR System Message Catalog form by using the ARMsgCatalogEntryCreator utility. This utility creates new records in the AR System Message Catalog form. The PWA screens use these records in the AR System Message Catalog form and display localized strings based on the browser locale.

To localize a progressive web application, you don't need the static, locale-specific views created by the localization toolkit for standard applications. For PWA, the localization toolkit is used only to extract the localizable strings from the objects and to export the strings into a TSV file. 

PWA uses the AR System Message Catalog form to store and retrieve translations as required. Thus, as a Remedy developer, you do not need to create locale-specific views for the same objects by using the new form.

If you are a  user, you must configure a client gateway to access and customize your application by using .

Review the Best practices for localizing a progressive web application section below before you perform the localization process.

The following video (7:31) provides an overview of how to localize a Progressive Web Application.

icon_play.png https://youtu.be/e2tOOdpBAB0

PWA supports the following languages out-of-the-box:

  • en—English (default)
  • de—German
  • es—Spanish
  • fr—French
  • iw_IL—Hebrew
  • it—Italian
  • ja- Japanese
  • ko-Korean
  • pt_BR—Portuguese 
  • ru—Russian
  • zh_CN—Chinese

If you want to localize your Progressive Web Application in any other language, use the following localization process.

Localization process

Perform the following steps in  to complete the localization process:

localization-process.png

  1. Prepare your application that you want to localize.
  2. Install the localization toolkit.
  3. Set a root folder.
  4. Create a package definition for the forms that you want to localize.
  5. Extract the strings that you want to localize.
  6. Export the strings in a file that has the default Tab Separated Values (TSV) format.
  7. Translate the strings in the TSV file.
  8. Import the TSV file to the AR System Message Catalog form.

To prepare your application that you want to localize

To be ready for localization, your server must be configured for localization. Additionally, applications must have the correct localization properties set for forms, their associated views, and fields. By default, all forms, views, and fields are configured to be localized, so you should not have to manually set each property. Conversely, if you have specific forms, views, or fields that you do not want localized, set the property accordingly.

For instructions, see Preparing-your-application-to-be-localized.

To install the localization toolkit

When you install the localization toolkit, the localization toolkit files are added to the DeveloperStudio folder of your  installation. (The default installation directory is C:\Program Files\BMC Software\ARSystem\ DeveloperStudio.)

The localization toolkit plug-ins are placed in the plugins folder with the other  plug-ins. A Localization Package Definitions branch is added to each server in the AR System Navigator in .

For instructions, see Installing-the-localization-toolkit.

To set a root folder

To begin the localization process, set a root folder, which stores:

  • The localization database (l10n.db )
  • The log file that logs the translation progress (l10n.log )
  • Package definition files that you create for translation

The default root folder is the BMCRemedyDeveloperStudioInstallDir\workspace\l10N folder.

For instructions, see Setting-a-root-folder.

To create a package definitions for the forms

The Localization Package Definition editor in  makes it easy to create a localization package definition for your application and any other forms that you want in the package definition.

For instructions, see Creating-a-localization-package-definition.

To extract the strings that you want to localize

After you create a localization package definition, you can extract the strings for localization into the localization database (l10n.db in the root folder).

For instructions, see Extracting-the-strings-for-localization.

To export the extracted strings to a TSV file

For Progressive Views, you must use the TSV format.

Important

  • While exporting strings for localization, you can opt to export only the items that are related with Progressive Views.
  • The time taken to extract or export strings depends upon the number of items involved. Therefore, it can take a while to export large number of items, for example, 1000 or 2000.
  • You cannot use a TSV file to import translations through the localization toolkit. This file is generated specifically for the AR System Message Catalog form. Use the command-line utility to import a TSV file in to the AR System Message Catalog form after translation.

 Perform the following steps:

  1. In , open the localization package definition.
  2. Click Export Strings.
  3. In the Localization Item Export dialog box, enter the full path to a target .tsv file that will contain the extracted strings.
    If the path you enter does not have a TSV file, then it is created. If you specify a full path, the file is created at that location. If you specify only a file name, the file is created in the root folder.
    The default root folder is the BMCRemedyDeveloperStudioInstallDir\workspace\l10N folder.
  4. Select the locale you want to export.
  5. Select the state of the strings that you want to export.
  6. Click OK.
    Only those items that are set to the state you selected in step 5 (for example, "Ready to Translate") are exported to the .tsv file. For more information, see Reviewing the status of the translation progress.

    Tip

    For each locale, add a new column with localized strings that map to the Source Text column to the exported file. Add the locale code to the header of the new localized column.

Tab Separated Values (TSV) file

The following image shows a sample TSV file before translation:

before-translation.png

The following table provides information about the columns in the exported TSV file:

Column name

Description

Message-Type

The type of the object for which the string is extracted.

See Types of objects exported.

Form Name/Message ID

The name of the Form or Active Link or Filter

VUI ID

The View ID of the Form

Field ID/Message Num

Field ID or message number from the Active Link or Filter actions

Source Text

The string to be localized. It includes the following:

  • Field labels, such as Data Fields, Control Fields, and Selection Fields
  • Selection alias for fields such as Radio button and Drop-down list
  • Help text from forms and fields
  • Alternative text for fields
  • Message strings from Active Links and Filters

Important

In a TSV file, characters such as comma (,) are replaced by tags such as <comma> in strings.

Because TSV is a delimiter-separated file, characters such as commas or new lines in the file result in localization strings occupying multiple cells and rows instead of just one cell. Therefore, these are replaced by tags as shown in the following table:

Character

Description

Tag used

\r\n

Carriage return and new line

<crlf>

\n

New line

<lf>

\r

Carriage return

<cr>

,

Comma

<comma>

Types of objects exported

Click here to see the types of objects currently exported in a TSV file

Message type

Type of object

Description of the string

0

System Message

Belongs to a System message action.

1

Active Link Message

Belongs to an Active Link message action.

2

Filter Message

Belongs to a Filter message action.

3

Active Link Help Text

Belongs to the Help Text property of an Active Link.

4

Form Help Text

Belongs to the Help Text property of a Form.

5

Field Help Text

Belongs to the Help Text property of a Field.

6

Container Description

Belongs to the Description property of a Container.

7

List Menu Definition

Belongs to the Definition property of a List Menu.

8

External Report

Belongs to an External Report.

9

Container Label

Belongs to the Label property of a Container.

10

Container Help

Belongs to the Help property of a Container.

11

Application Help

Belongs to the Help property of an Application.

12

Application About

Belongs to the About property of an Application.

13

Application Help Index

Belongs to the Help Index property of an Application.

14

Flashboards System Message

Belongs to the System Message property of Flashboards.

15

Flashboards Label

Belongs to the Label property of Flashboards.

16

Field Label

Belongs to the Label property of a Field.

17

Field Help Text

Belongs to the Help Text property of a Field.

18

Alternative Text

Belongs to the Alternative Text property of a Field.

19

Selection Alias

Belongs to the Alias property of a Selection Field.

20

Label for Empty Value

Belongs to the Empty Value property of a Label.

21

Alias Singular

Belongs to the Singular property of an Alias Field.

22

Alias Plural

Belongs to the Plural property of an Alias Field.

23

Alias Short Singular

Belongs to the Short Singular property of an Alias Field.

24

Alias Short Plural

Belongs to the Short Plural property of an Alias Field.

25

Entrypoint Label Default New

Belongs to the Default New property of an Entrypoint Label.

26

Entrypoint Label Default Search

Belongs to the Default Search property of an Entrypoint Label.

27

Attach Add Label

Belongs to the Add Label property of an Attach Field.

28

Attach Delete Label

Belongs to the Delete Label property of an Attach Field.

29

Attach Display Label

Belongs to the Display Label property of an Attach Field.

30

Attach Save Label

Belongs to the Save Label property of an Attach Field.

31

Attach File Name Title

Belongs to the File Name Title property of an Attach Field.

32

Attach File Size Title

Belongs to the File Size Title property of an Attach Field.

33

Attach Label Title

Belongs to the Label Title property of an Attach Field.

34

Attach Deselect Label

Belongs to the Deselect Label property of an Attach Field.

35

Button Text

Belongs to the Text property of a Button.

36

Menu Text

Belongs to the Text property of a Menu.

37

Menu Help

Belongs to the Help property of a Menu.

38

Tooltip

Belongs to the Text property of a Button.

39

HTML Text

Belongs to the Text property of HTML.

40

Enums Labels

Belongs to the Labels property of an Enumeration.

41

Text

Belongs to the Text property.

42

Table Selection Column Label

Belongs to the Column Label property of a Table Selection.

43

Table Root Node Alternative Text

Belongs to the Alternative Text property of a Table Root Node.

44

Table Entries Returned

Belongs to the Entries Returned property of a Table.

45

Table Refresh

Belongs to the Refresh property of a Table.

46

Table Delete

Belongs to the Delete property of a Table.

47

Table Report

Belongs to the Report property of a Table.

48

Table Select All

Belongs to the Select All property of a Table.

49

Table Deselect All

Belongs to the Deselect All property of a Table.

50

Table Preference

Belongs to the Preference property of a Table.

51

Table Chunk Next

Belongs to the Chunk Next property of a Table.

52

Table Chunk Previous

Belongs to the Chunk Previous property of a Table.

53

Row Label

Belongs to the Label property of a Row.

54

Row Label Plural

Belongs to the Label Plural property of a Row.

55

Table Auto Refresh

Belongs to the Auto Refresh property of a Table.

56

Table Unread

Belongs to the Unread property of a Table.

57

Table Read

Belongs to the Read property of a Table.

58

Table Not Refresh

Belongs to the Not Refresh property of a Table.

59

Tree Table Custom Value

Belongs to the Custom Value property of a Tree Table.

101

Message

Belongs to the Message property.

102

Data

Belongs to the Data property.

103

Entry Point

Belongs to the Entry Point property.

104

Menu

Belongs to the Menu property.

105

Description

Belongs to the Description property.

106

Guide Help Text

Belongs to the Help Text property of a Guide.

107

App Help Text

Belongs to the Help Text property of an Application.

To translate the strings in a TSV file

Send the exported TSV file to a vendor for translation. 

Best practice
For accurate translation, we recommend that you send the file to professional translators. (Open source and commercial editors are available for purchase by several third-party vendors.)

After the translation is completed, the TSV file has an additional sixth column which contains all the translations. The TSV file contains localized strings starting from the sixth column. That is, each column represents a single locale. 

The following image shows a sample TSV file after translation:

after-translation.png

To import a TSV file containing translated strings to the AR System Message Catalog Form

You can use the ARMsgCatalogEntryCreator utility that reads the TSV file and creates or updates an entry in the AR System Message Catalog form. The ARMsgCatalogEntryCreator utility accepts only a TSV file as an input.

Perform the following steps to import a TSV file to the AR System Message Catalog form using the ARMsgCatalogEntryCreator utility:

  1. Before you use this utility, sort the TSV file four times—first by the Form Name column, next by the Field ID column, next by the View ID column, and finally by the Message Type column.

    Important

    Make sure that your  supports the locale that you want to translate to. Otherwise, records with corrupted data, instead of the actual data, might get created in the AR System Message Catalog form.

  2. Navigate to <ARSystemInstallDir>/ARSystem/artools and find the armsgcatalogentrycreator.bat file.
  3. From a command prompt, run the armsgcatalogentrycreator.bat file by using the following command:

    ARMsgCatalogEntryCreator utility command syntax
    armsgcatalogentrycreator.bat [-x] [-u] [-p] [-t] [-f]
    ARMsgCatalogEntryCreator utility command example
    armsgcatalogentrycreator.bat -f <Location of TSV file>\Translations.tsv -u <Username> -x <Server Name>

    The following table describes the inputs for the Command Line Interface (CLI) and parameters for connecting to the :

    Parameter

    Description

    -x

    Name of the server to connect to.

    -u

    Name that identifies the user account for the .

    -p

    Password for the user account.

    If you have a blank password, you can ignore this option.

    -t

    TCP port number to connect to.

    If the port number is unknown, use -t 0.

    -f

    Name of the TSV file.

    Depending upon the row data, an entry is created or updated. For every locale, a separate entry is created per row. For example, a single row entry in the TSV file with three translations (that is, three different locales) creates three new entries for that string.

    Important

    The Selection Alias type of object (Message type 19) is handled in a special way. Suppose, there is a Selection Alias type of object called "Status" that has five aliases as New, Assigned, Fixed, Rejected, and Close. For each alias, instead of creating a separate entry, the aliases are combined into a single record.

    For example:

    {"New":"Neu","Assigned":"Zugewiesen","Fixed":"Fest","Rejected":"Abgelehnt","Closed":"Geschlossen"}

    In this example, each alias is separated by a comma (,) and contains two values—the left one is the actual string that is being exported and the right one is the translated string.

    Important

    In the TSV file, columns after the Source Text column hold the translated data. If the translated data column for a language has the same string as the Source Text (English) column, the ARMsgCatalogEntryCreator utility does not create a record for the same string in the AR System Message Catalog Form.

    For example, if you have a string 'ALL' in the English and the Russian language columns, the utility skips creating a new record for the string 'ALL' for the Russian language column.

    This is applicable for all message types except 19 (Selection Field) as all the values are combined in a single record.

Best practices for localizing a progressive web application

  • Use independent forms only so that the related Active Links and Filters are also considered.
  • For the form fields that you want to localize, set the value of the "Localize Label" property in Display Properties to True.
  • When you delete a package definition, the package definition is deleted, but the extracted strings are not deleted from the localization database. If you create a package definition with the same name as the deleted one and export, you get the extracted strings from the deleted package definition as well. To avoid this issue, we recommend that you explicitly delete those strings from the database.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*