This documentation supports the 20.02 version of BMC Helix Platform. 
To view an earlier version, select 19.11 from the Product version menu.

Localizing a Digital Service application

You can enable localization for your smart bundle and localize the Digital Service application definitions and data. After you localize a smart bundle, user can view the application user interface (UI) and error messages in the preferred language.

Localization files

After you generate a smart bundle from archetype, following files are automatically created in the application project:

  • localized-strings.json (located at bundle\src\main\webapp\resources\i18n)
  • localized-strings.properties (located at bundle\src\main\resources)

For more information on Projects created by the archetype, see Creating a Project using Maven and the Archetype.

Supported languages

English (EN) is the default language of the BMC Helix PlatformYou can localize your application in any language except the right to left languages. Right to left languages such as Hebrew and Arabic are not supported.

BMC Helix Platform supports the following languages for the translation of error messages, warning messages, and static strings on your application UI:

  • French
  • German
  • Italian
  • Japanese
  • Korean
  • Portuguese (Brazil)
  • Russian
  • Simplified Chinese
  • Spanish

Before you begin

Before you begin with localization of your application, ensure that the application is localizable. To make your application localizable, you must extract the strings that you want to localization  from your application code and definitions.

  • Extract the Java based string in localized-strings.properties file.
  • Extract the JavaScript based strings in localized-strings.json file.

To localize definition based strings

  1. Declare the custom view component properties (like field labels, column labels, action button labels, and so on) as localizable. 

    1. Navigate to <view-component-name>.config.js file located in the view-components/<view-component-name> folder.
    2. Declare the view component properties as localizable. Following is a sample code to configure a view component to declare localization properties:

      rxViewComponentProvider.registerComponent([
              {
                  name: 'Display Greetings',
                  group: 'Hello World Components',
                  icon: 'speaker',
                  type: 'rx-greeting',
                  designType: 'rx-greeting-design',
                  propertiesByName: [
                      {
                          name: 'greeting',
                          type: 'string',
                          isRequired: true,
                          isConfig: true,
                          isProperty: true,
                          localizable: true
                      }
                  ]
              }
          ]);
  2. Redeploy your application.
    To redeploy your application, in a command shell, navigate to the application parent directory and run the following command:

    mvn clean install –Pexport -Pdeploy
    
  3. In BMC Helix Innovation Studio, if you have created any view definition using the custom view component, you must create the view definition again (this is required as you change the source code for the view component in Step 1).
  4. Apply translations.

To localize Java based strings

  1. In localized-strings.properties file (located at bundle\src\main\resources), add the strings that you want to localize.
  2. Import the strings from the localized-strings.properties file to BMC Helix Platform.

    To import strings, in a command shell, navigate to the application parent directory and run the following command:

    mvn clean install -Plocalization

    After you run this command, the strings are available in the BMC Helix Innovation Studio.

  3. Apply translations.

To localize static strings

To localize any static strings in your application code, you must apply the localization filter to all static HTML strings. To retrieve localized strings, you must use the localization service.

The following code snippet is an example using the translate filter:

<input type="search" id="search" class="d-navigation__search-item" placeholder="{{'rx.core.components.search-field.searchbox.placeholder' | translate}}"/>

The following code snippet is an example of using the $translate service

$translate([
   'tms.approvals.myApprovals.title',
   'tms.approvals.myApprovals.subtitle'
]).then(function (translations) {
    $scope.title = translations['tms.approval.myApprovals.title'];
    $scope.subtitle = translations['tms.approval.myApprovals.subtitle'];
});

Note

Ensure that the string localization key follow the following name space:

modulename.componentname.subpart.type.label (modulename.componentname is required)

For example, "tms.approvals.actionbar.action.approve" : "Approve"

To localize OOTB view component definitions

As an application business analyst, you can customize a view definition and localize it by using BMC Helix Innovation Studio. For example, you can edit or create view definitions and then localize your application. To localize the OOTB view component definitions, perform the following:

  1. Log in to BMC Helix Innovation Studio, and through the Workspace, navigate to the application for which you want to customize definitions.

  2. Customize the definitions as per your requirements and save the definitions.
  3. Apply translations.

To localize record instances

You can localize record instances by using the locale field. The field ID of the locale field is 160.

  1. Localize the server.
    In a browser, open the BMC Remedy AR System Administration Console, navigate to General > Server Information > Advanced, and enable Localized Error Messages (Localize Server).
  2. Create a text field with field ID 160 in the record definition for which you want to localize record instances.
  3. Create record instances and provide valid values for the locale fields.

When you use a record definition with locale field in a view component such as record grid, only the record instances for the accepted locale are displayed.

To apply translations

  1. In BMC Helix Innovation Studio, in your application, navigate to Translations > Download Translations and download the localized-strings.json file.
    Following is a sample localized-strings.json file:

    {
    "7a97b657-0162-426b-9df9-78e35d0fde6a":"Welcome"
    }
  2. Translate the localized-strings.json file in the following format:

    {
    "fr" : {
    "7a97b657-0162-426b-9df9-78e35d0fde6a":"Bienvenue"
    }, 
    "de": {
    "7a97b657-0162-426b-9df9-78e35d0fde6a":"
    Willkommen
    "
    }
    }
  3. In BMC Helix Innovation Studio, navigate to Translations > Upload Translations and upload the translated localized-strings.json file.

To localize error messages

To localize the error messages, perform the steps in To localize Java based strings section.

Related topics

Creating custom view components

Creating record instances

Was this page helpful? Yes No Submitting... Thank you

Comments