[EC-154] [BEEEP] Add token for localesDirectory (#783)
* Add token for localesDirectory * Add token for SYSTEM_LANGUAGE
This commit is contained in:
parent
e4687b4cc6
commit
d7e554653a
|
@ -91,6 +91,8 @@ export const LOGOUT_CALLBACK = new InjectionToken<(expired: boolean, userId?: st
|
||||||
);
|
);
|
||||||
export const LOCKED_CALLBACK = new InjectionToken<() => void>("LOCKED_CALLBACK");
|
export const LOCKED_CALLBACK = new InjectionToken<() => void>("LOCKED_CALLBACK");
|
||||||
export const CLIENT_TYPE = new InjectionToken<boolean>("CLIENT_TYPE");
|
export const CLIENT_TYPE = new InjectionToken<boolean>("CLIENT_TYPE");
|
||||||
|
export const LOCALES_DIRECTORY = new InjectionToken<string>("LOCALES_DIRECTORY");
|
||||||
|
export const SYSTEM_LANGUAGE = new InjectionToken<string>("SYSTEM_LANGUAGE");
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [],
|
declarations: [],
|
||||||
|
@ -106,6 +108,15 @@ export const CLIENT_TYPE = new InjectionToken<boolean>("CLIENT_TYPE");
|
||||||
useFactory: (i18nService: I18nServiceAbstraction) => i18nService.translationLocale,
|
useFactory: (i18nService: I18nServiceAbstraction) => i18nService.translationLocale,
|
||||||
deps: [I18nServiceAbstraction],
|
deps: [I18nServiceAbstraction],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
provide: LOCALES_DIRECTORY,
|
||||||
|
useValue: "./locales",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
provide: SYSTEM_LANGUAGE,
|
||||||
|
useFactory: (window: Window) => window.navigator.language,
|
||||||
|
deps: [WINDOW],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
provide: STATE_FACTORY,
|
provide: STATE_FACTORY,
|
||||||
useValue: new StateFactory(GlobalState, Account),
|
useValue: new StateFactory(GlobalState, Account),
|
||||||
|
|
Loading…
Reference in New Issue