About Internationalizing and Localizing Oracle JET Applications

The Oracle JET framework includes support for internationalization (I18N) , localization (L10N), and Oracle National Language Support (NLS) translation bundles.

Internationalization (I18N) is the process of designing software so that it can be adapted to various languages and regions easily, cost effectively, and, in particular, without engineering changes to the software. Localization (L10N) is the use of locale-specific language and constructs at run time. Oracle has adopted the industry standards for I18N and L10N such as World Wide Web Consortium (W3C) recommendations, Unicode technologies, and Internet Engineering Task Force (IETF) specifications to enable support for the various languages, writing systems, and regional conventions of the world.

Languages and locales are identified with a standard language tag and processed as defined in BCP 47.

The Oracle JET framework includes Oracle National Language Support (NLS) translation support for the languages listed in the following table.

Language Language Tag Language Language Tag

Arabic

ar

Korean

ko

Brazilian Portuguese

pt

Norwegian

no

Canadian French

fr-CA

Polish

pl

Czech

cs

Portuguese

pt-PT

Danish

da

Romania

ro

Dutch

nl

Russian

ru

Finnish

fi

Simplified Chinese

zh-Hans (or zh-CN)

French

fr

Slovak

sk

German

de

Spanish

es

Greek

el

Swedish

sv

Hebrew

he

Thai

th

Hungarian

hu

Traditional Chinese

zh-Hant (or zh-TW)

Italian

it

Turkish

tr

Japanese

ja

   

Oracle JET translations are stored in a resource bundle. You can add your own translations to the bundles. For additional information see Adding Translation Bundles to Oracle JET.

The Oracle JET framework also includes formatting support for over 180 locales. Oracle JET locale elements are based upon the Unicode Common Locale Data Repository (CLDR) and are stored in locale bundles. For additional information about Unicode CLDR, see http://cldr.unicode.org. You can find the supported locale bundles in the Oracle JET distribution:

js/libs/oj/vxxx/resources/nls

It is the application's responsibility to determine the locale used on the page. Typically the application determines the locale by calculating it on the server side from the browser locale setting or by using the user locale preference stored in an identity store and the supported translation languages of the application.

Once the locale is determined, your application must communicate this locale to the Oracle JET framework for its locale sensitive operations such as loading resource bundles and formatting date-time data. Oracle JET determines the locale for locale sensitive operations in the following order:

  1. Locale specification in the RequireJS configuration.

  2. lang attribute of the html tag.

  3. navigator.language browser property or navigator.userLanguage Internet Explorer property.

Setting the lang attribute on the html tag is the recommended practice because, in addition to setting the locale for the Oracle JET framework, it sets the locale for all HTML elements as well. The Oracle JET framework automatically loads the translations bundle for the current language and the locale bundle for the locale that was set. If you don't set a locale, the Oracle JET framework will default to the browser property.

Note:

The locale and resource bundles are loaded automatically only when your application uses the RequireJS ojl10n plugin. For information about using RequireJS in your Oracle JET application, see Using RequireJS for Modular Development.

Finally, Oracle JET includes validators and converters that use the locale bundles. When you change the locale on the page, an Oracle JET component has built in support for displaying content in the new locale. For additional information about Oracle JET's validators and converters, see Validating and Converting Input.