fix(compiler): normalize the locale name (#18963)
This commit is contained in:
parent
4ec5e282d9
commit
043f104738
|
@ -229,9 +229,10 @@ export class AotCompiler {
|
|||
const providers: CompileProviderMetadata[] = [];
|
||||
|
||||
if (this._localeId) {
|
||||
const normalizedLocale = this._localeId.replace(/_/g, '-');
|
||||
providers.push({
|
||||
token: createTokenForExternalReference(this._reflector, Identifiers.LOCALE_ID),
|
||||
useValue: this._localeId,
|
||||
useValue: normalizedLocale,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue