feat(i18n): Add NgLocaleLocalization which returns plural cases given a locale (#10744)
This commit is contained in:
19
tools/public_api_guard/common/index.d.ts
vendored
19
tools/public_api_guard/common/index.d.ts
vendored
@ -36,6 +36,9 @@ export declare class DecimalPipe implements PipeTransform {
|
||||
transform(value: any, digits?: string): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function getPluralCase(locale: string, nLike: number | string): Plural;
|
||||
|
||||
/** @stable */
|
||||
export declare class HashLocationStrategy extends LocationStrategy {
|
||||
constructor(_platformLocation: PlatformLocation, _baseHref?: string);
|
||||
@ -129,6 +132,12 @@ export declare class NgIf {
|
||||
constructor(_viewContainer: ViewContainerRef, _templateRef: TemplateRef<Object>);
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class NgLocaleLocalization extends NgLocalization {
|
||||
constructor(_locale: string);
|
||||
getPluralCategory(value: any): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class NgLocalization {
|
||||
abstract getPluralCategory(value: any): string;
|
||||
@ -213,6 +222,16 @@ export declare abstract class PlatformLocation {
|
||||
abstract replaceState(state: any, title: string, url: string): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare enum Plural {
|
||||
Zero = 0,
|
||||
One = 1,
|
||||
Two = 2,
|
||||
Few = 3,
|
||||
Many = 4,
|
||||
Other = 5,
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare class ReplacePipe implements PipeTransform {
|
||||
transform(value: any, pattern: string | RegExp, replacement: Function | string): any;
|
||||
|
Reference in New Issue
Block a user