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