Translating custom content

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Translating custom content

    The ServiceNow AI Platform allows for the translation of custom content, either to supported languages or to unsupported languages through a recommended Localization Framework application. It is crucial to provide your own translations for custom applications and modifications, as the platform does not offer automatic translation capabilities.

    Show full answer Show less

    Key Features

    • Translation Methods: Different approaches are required based on the type of content being translated, such as field labels, UI pages, Service Catalog items, and Service Portal widgets.
    • Translation Records: For each English message, create corresponding Message records for other languages, using the gs.getMessage calls for UI pages and externalizing text in Service Portal widgets.
    • Unsupported Languages: To translate into unsupported languages, create Choice records and follow the export/import process for additional translation records.
    • Custom Notifications and Surveys: Create separate versions for each language and implement business rules to manage user access to the correct language version.

    Key Outcomes

    By effectively utilizing these translation methods, you can ensure that your custom content is accessible in various languages, enhancing user experience and broadening your application's reach. Regularly repeat the translation process whenever content is edited or updated to maintain consistency across languages.

    Translate content you create or modify to a supported language or add an unsupported language.

    Note:
    Using the Localization Framework application is recommend for translating to an unsupported language or translating large amounts of custom UI string content in a supported language. For more information, see Localization Framework.

    ServiceNow provides translations of the base system UI strings in supported languages through the internationalization (I18N) language plugins. For applications you create and modifications you make to the ServiceNow AI Platform® content, you must provide your own translations. You can also provide any translations to unsupported languages that ServiceNow does not provide translations for. The ServiceNow AI Platform does not provide any automatic translation capability.

    The translation method depends on the material that you are translating. Repeat the translation process whenever you edit or update content.
    Table 1. Translation methods and use cases
    What needs translation Approach to take Resources
    Field labels in a table for a customer-created application
    1. Create English versions for all fields in the table.
    2. Locate the records for the table in the application.
    3. Open the Field Labels translation table.
    4. Export the records, translate the appropriate fields, set the language field, and reimport through an import set.
    HTML in a UI page in a customer-created application
    1. Create the English version. When creating the HTML in the UI Page form, wrap any translatable text in gs.getMessage calls.
    2. Create a Message [sys_ui_message] record for each English message with a corresponding key/value pair.
    3. Create additional Message records for each message for each other language.
    Translate a client script message
    Service Catalog items
    1. Navigate to All > System Properties > System Localization and set Display translation prefix on translatable strings to Yes.
    2. Create the item in English.
    3. Change the preferred language to a different language.
    4. Translate all the translatable items, now identified by translation prefix.
    5. Save the record.
    Service Portal widget
    1. Create the English version. Externalize any translatable text by surrounding the text with ${} wrappers.
    2. Create a Message [sys_ui_message] record for each English translatable text with a corresponding key/value pair.
    3. Create additional Message records for each piece of translatable text for each other language.
    Edit a translation provided in a plugin
    1. Export the records from the translation table.
    2. Edit them outside the translation table and reimport them.
    Do not edit the records directly, because your changes could be overwritten when you upgrade or zBoot your instance.
    Export and edit translation records
    Translate an instance to an unsupported language
    1. Create a Choice [sys_choice] record for that language.
    2. Add other translation records through the Export and import set approach.
    Translating to an unsupported language
    Support Chat texts Support Chat is mostly translated through the I18N language plugins. If you customize any Support Chat texts, follow the procedure for Service Portal widgets. Internationalize a widget in Service Portal documentation
    Notifications and surveys System Localization does not cover platform notifications or surveys. The usual approach is to create a separate version of each survey or notification in each language and use business rules to send the right language version to the right end user. —