Open Ketec opened 3 years ago
If the locale is set using this.translocoLocaleService.setLocale(locale) (or default) it is overwritten the moment this.translocoService.setActiveLang(lang); is called.
this.translocoLocaleService.setLocale(locale)
this.translocoService.setActiveLang(lang);
Because of the https://github.com/ngneat/transloco/blob/master/projects/ngneat/transloco-locale/src/lib/transloco-locale.service.ts translocoService.langChanges$ subscription.
translocoService.langChanges$
There is no property or config to disable this behaviour.toLocale() method is private so it cannot be overridden to not overwrite locale.
toLocale()
Language and locale can be configured separately (people often want to use their own local region formats but prefer English as the UI language).
Do you want to create a PR?
If i find some time to check out and correctly add the config + tests and documentation in the correct place.
@shaharkazaz Can the PR be checked and verified?
If the locale is set using
this.translocoLocaleService.setLocale(locale)
(or default) it is overwritten the momentthis.translocoService.setActiveLang(lang);
is called.Because of the https://github.com/ngneat/transloco/blob/master/projects/ngneat/transloco-locale/src/lib/transloco-locale.service.ts
translocoService.langChanges$
subscription.There is no property or config to disable this behaviour.
toLocale()
method is private so it cannot be overridden to not overwrite locale.Language and locale can be configured separately (people often want to use their own local region formats but prefer English as the UI language).