@acoustic-content-sdk/i18n
TypeScript icon, indicating that this package has built-in type declarations

9.0.10076 • Public • Published

npm

Utility functions to help working with locales.

API Documentation

Home > @acoustic-content-sdk/i18n

i18n package

Utility functions to help working with locales.

Functions

Function Description
byLocaleComparator(aLocContext, aLocaleExtractor) Returns a comparator that compares objects by their locale according to a locale preference
canonicalizeLocale(aLocale) Returns a canonicalized version of the locale

Variables

Variable Description
VERSION Version and build number of the package

Home > @acoustic-content-sdk/i18n > byLocaleComparator

byLocaleComparator() function

Returns a comparator that compares objects by their locale according to a locale preference

Signature:

export declare function byLocaleComparator<T>(aLocContext: LocalizedContext, aLocaleExtractor: UnaryFunction<T, Locale>): Comparator<T>;

Parameters

Parameter Type Description
aLocContext LocalizedContext the locale preference
aLocaleExtractor UnaryFunction<T, Locale> extractor of the locale from the object

Returns:

Comparator<T>

the comparator

Home > @acoustic-content-sdk/i18n > canonicalizeLocale

canonicalizeLocale() function

Returns a canonicalized version of the locale

Signature:

export declare function canonicalizeLocale(aLocale: Locale): Locale;

Parameters

Parameter Type Description
aLocale Locale the locale to canonicalize

Returns:

Locale

the canonical version

Home > @acoustic-content-sdk/i18n > VERSION

VERSION variable

Version and build number of the package

Signature:

VERSION: {
    version: {
        major: string;
        minor: string;
        patch: string;
        branch: string;
    };
    build: Date;
}

Package Sidebar

Install

npm i @acoustic-content-sdk/i18n

Weekly Downloads

1

Version

9.0.10076

License

MIT

Unpacked Size

55.6 kB

Total Files

33

Last publish

Collaborators

  • marcin-pasiewicz
  • nikodem.graczewski.acoustic
  • pawel.galias-ac
  • orenaksakal
  • marcin.konopka-ac