• Overview
@angular/common

getLocaleId

function
Deprecated

Retrieves the locale ID from the currently loaded locale. The loaded locale could be, for example, a global one rather than a regional one.

  
    function getLocaleId(  locale: string): string;
  
  

getLocaleId

string

Retrieves the locale ID from the currently loaded locale. The loaded locale could be, for example, a global one rather than a regional one.

@deprecated

Angular recommends relying on the Intl API for i18n. This function serves no purpose when relying on the Intl API.

@paramlocalestring

A locale code, such as fr-FR.

@returnsstring
Jump to details