File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 1- import { BrowserModule } from '@angular/platform-browser' ;
1+ import { BrowserModule } from '@angular/platform-browser' ;
22import { BrowserAnimationsModule } from '@angular/platform-browser/animations' ;
3- import { NgModule , Injector , APP_INITIALIZER } from '@angular/core' ;
3+ import { NgModule , Injector , APP_INITIALIZER , LOCALE_ID } from '@angular/core' ;
44
55import { AbpModule , ABP_HTTP_PROVIDER } from '@abp/abp.module' ;
66
@@ -43,6 +43,10 @@ export function getRemoteServiceBaseUrl(): string {
4343 return AppConsts . remoteServiceBaseUrl ;
4444}
4545
46+ export function getCurrentLanguage ( ) : string {
47+ return abp . localization . currentLanguage . name ;
48+ }
49+
4650@NgModule ( {
4751 imports : [
4852 BrowserModule ,
@@ -64,10 +68,14 @@ export function getRemoteServiceBaseUrl(): string {
6468 useFactory : appInitializerFactory ,
6569 deps : [ Injector ] ,
6670 multi : true
67- }
71+ } ,
72+ {
73+ provide : LOCALE_ID ,
74+ useFactory : getCurrentLanguage
75+ }
6876 ] ,
6977 bootstrap : [ RootComponent ]
7078} )
7179export class RootModule {
7280
73- }
81+ }
You can’t perform that action at this time.
0 commit comments