@acoustic-content-sdk/i18n 中文文档教程

发布于 3 年前 浏览 18 更新于 2 年前

npm

帮助处理语言环境的实用函数。

API Documentation

Home > @acoustic-content-sdk/i18n

i18n package

有助于处理语言环境的实用函数。

Functions

FunctionDescription
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

VariableDescription
VERSIONVersion and build number of the package

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

byLocaleComparator() function

返回一个比较器,根据区域设置比较对象的区域设置

签名:

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

Parameters

ParameterTypeDescription
aLocContextLocalizedContextthe locale preference
aLocaleExtractorUnaryFunction&lt;T, Locale&gt;extractor of the locale from the object

返回:

Comparator< ;T>

the comparator

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

canonicalizeLocale() function

返回区域设置的规范化版本

签名:

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

Parameters

ParameterTypeDescription
aLocaleLocalethe locale to canonicalize

返回:

Locale

规范化版本

首页首页 @acoustic-content-sdk/i18n > VERSION

VERSION variable

软件包的版本和构建号

签名:

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

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

FunctionDescription
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

VariableDescription
VERSIONVersion 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

ParameterTypeDescription
aLocContextLocalizedContextthe locale preference
aLocaleExtractorUnaryFunction&lt;T, Locale&gt;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

ParameterTypeDescription
aLocaleLocalethe 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;
}
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文