Closed ihor-zinchenko closed 3 years ago
Hi @ihor-zinchenko,
the problem here is not fr-ca
, the problem is that you have to setting format
option to language-region
, I guess.
Then if you want to use the language-region
format, it would be better to use it for each locale.
There is my full config code:
export const l10nConfig: L10nConfig = {
format: 'language-region',
providers: [
{ name: 'app', asset: './assets/localizations/', options: { version: '11.0.0' } }
],
fallback: false,
cache: true,
keySeparator: '.',
defaultLocale: { language: 'en', currency: 'USD', timeZone: 'America/Los_Angeles' },
schema: [
{ locale: { language: 'en', currency: 'USD', timeZone: 'America/Los_Angeles' }, dir: 'ltr', text: 'United States' },
{ locale: { language: 'da', currency: 'USD', timeZone: 'America/Los_Angeles' }, dir: 'ltr', text: 'Danish' },
{ locale: { language: 'fr', currency: 'USD', timeZone: 'America/Los_Angeles' }, dir: 'ltr', text: 'French' },
{ locale: { language: 'fr-ca'}, dir: 'ltr', text: 'French (Canada)' },
{ locale: { language: 'zh-sm', currency: 'USD', timeZone: 'America/Los_Angeles' }, dir: 'ltr', text: 'Chinese (simplified)' },
],
defaultRouting: true
};
each line with language-EXAMPLE gives me error
So you mean if i set for example en-us for each line it will work?
If you use the language-region
format would be appropriate to use it for all.
However perhaps the error here is that the correct form for the region is uppercase: fr-CA, zh-SM
@robisim74 yes, uppercase works correctly!) thanks!
Hi! When i try to set confige like that
i've got angular-l10n (formatLanguage): Invalid language thrown error but if i change language fr-ca to frc it works correctly but correct ISO code for French (Canada) is fr-ca. Also i have the same issue for the different language Please help me))