API Reference / @dasch-ng/utils / intl/src / IntlCanonicalLocalePipe
Class: IntlCanonicalLocalePipe
Defined in: libs/ng/utils/intl/src/lib/intl-localized.pipe.ts:55
Normalizes a BCP 47 language tag with Intl.getCanonicalLocales: de-de → de-DE, zh-hant-tw → zh-Hant-TW. Invalid tags return the input unchanged.
Example
html
<span [lang]="asset.language | intlCanonicalLocale">{{ asset.title }}</span>Implements
PipeTransform
Constructors
Constructor
new IntlCanonicalLocalePipe():
IntlCanonicalLocalePipe
Returns
IntlCanonicalLocalePipe
Methods
transform()
transform(
tag):string
Defined in: libs/ng/utils/intl/src/lib/intl-localized.pipe.ts:56
Parameters
tag
string | null | undefined
Returns
string
Implementation of
PipeTransform.transform