pp108 : TranslationUtil

TranslationUtil


This API is used to invoke the util function for retrieving the runtime language. The language is retrieved depending on how it is set; the order of preference is as follows:

  1. language set using the URL
  2. language set as a CUSP preference
  3. language set as a browser preference

The method defined on the TranslationUtil component is as follows:

Table 1. List of Static Methods

Method

Description

getRuntimeLanguage()

This method returns the code of the language used at the runtime.
The language code is retrieved based on the preference and is in the order of the URL, CUSP Preferences, browser locale setting.

getLanguageDirection()

This method is used in the front end for retrieving the runtime language direction.

It returns

  • LTR : For Left-to-Right direction languages
  • RTL : For Right-to-Left direction languages