This is the archived documentation for Angular v5. Please visit angular.io to see documentation for the current version of Angular.

NgLocaleLocalization

npm Package @angular/common
Module import { NgLocaleLocalization } from '@angular/common';
Source common/src/i18n/localization.ts

Overview

      
      class NgLocaleLocalization extends NgLocalization {
  constructor(locale: string, deprecatedPluralFn?: ((locale: string, value: number | string) => Plural) | null)
  protected locale: string
  protected deprecatedPluralFn?: ((locale: string, value: number | string) => Plural) | null
  getPluralCategory(value: any, locale?: string): string
  // inherited from common/NgLocalization
  getPluralCategory(value: any, locale?: string): string
}
    

Description

Returns the plural case based on the locale

Constructor

      
      constructor(locale: string, deprecatedPluralFn?: ((locale: string, value: number | string) => Plural) | null)
    

Members

      
      protected locale: string
    

      
      protected deprecatedPluralFn?: ((locale: string, value: number | string) => Plural) | null
    

      
      getPluralCategory(value: any, locale?: string): string
    

Annotations

      
      @Injectable()