Adding a New Language in your Application

Perform this procedure if you are using Canvas Technology Platform version 17.1 or lower only. If you are using version 18.1 or higher, refer Adding a New Language in your Application - from Canvas 18.1 onwards.


To support a new language in your application, perform the following steps:

  1. Add an entry in the LANGUAGEMASTER table (in Canvas model schema) with the Language ID that must be suffixed with all property files. Additionally, specify the text direction as either left-to-right (LTR) or right-to-left (RTL) accordingly.

    Implementation developers are not expected to change the flow or the framework components used during rendering of workspaces.

  2. In multilingualconfig.properties file,

    1. Add the newly created Language ID to the CT_LANG_COUNTRY_CODE property. For example,

      CT_LANG_COUNTRY_CODE=en_US,ar_SA,zh_TW
    2. Add the following code snippet to register the language:

      LocaleLanguageCharacterSetFactory factory = LocaleLanguageCharacterSetFactory.getInstance();
      factory.registerCharacterSet("en_US", new EnglishLocale());

      Here, the class EnglishLocale is created to have English language characters along with the numerical and the special characters.

      In case if the forms in the application accepts only English characters then you can use the existing "EnglishLocale" class.

  3. Create the Resource Bundle property files in the new language that are required for the application. While creating the property files, use the following naming convention:

    'FileName' + '_' + 'LangID created' + '.' + properties

    For example, if zh_TW is the Language ID, then the property file must be named as follows:

    common_zh_TW.properties

    This should be done for all the keys present in all the property file bundles used by the application. The list of property files that you are using can be identified from the key CT_PROPERTY_LABELS provided in the multilingualconfig.properties.

    Important

    • Canvas supports Unicode characters for each and every label you create in the property file. You must ensure to provide Unicode values for the labels in the property files you create rather than directly including the language values.
    • The list of property files does not cover the default labels or messages used by the Canvas framework. To ensure complete translation of framework messages, create a new translation property file for canvas-default_en_US.properties present in the CTResources.jar.