Namespace: ojtranslationbundleutils

Oracle® JavaScript Extension Toolkit (JET)
18.1.0

G25382-01

Since:
  • 18.1.0
Module:
  • ojtranslationbundleutils

QuickNav

Description

Utility functions for managing translated resource bundles


Usage

Typescript Import Format
//This namespace exports multiple static methods or members. To import 
import * as ojtranslationbundleutils from "ojs/ojtranslationbundleutils";

//Now you can access the methods as ojtranslationbundleutils.methodName and so on

For additional information visit:


Utility functions for managing translated resource bundles

Methods

matchTranslationBundle(locale, supportedLocales) : {string|null}

Finds the best match for a given locale within a set of supported locales.
Parameters:
Name Type Description
locale string user's locale
supportedLocales Set<string> the set of supported locales
Returns:

a locale representing the best match for the user's locale, or null if no match was found

Type
string | null