aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/main.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/main.ts')
-rw-r--r--client/src/main.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/main.ts b/client/src/main.ts
index 19f45a3e3..061be17de 100644
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -5,14 +5,17 @@ import { AppModule } from './app/app.module'
5import { environment } from './environments/environment' 5import { environment } from './environments/environment'
6 6
7import { hmrBootstrap } from './hmr' 7import { hmrBootstrap } from './hmr'
8import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils'
8 9
9let providers = [] 10let providers = []
10if (environment.production) { 11if (environment.production) {
11 enableProdMode() 12 enableProdMode()
12} 13}
13 14
14if (environment.production === false && window.location.search === '?lang=fr') { 15// Template translation, should be in the bootstrap step
15 const translations = require(`raw-loader!./locale/target/angular_fr.xml`) 16if (isOnDevLocale()) {
17 const locale = getDevLocale()
18 const translations = require(`raw-loader!./locale/target/angular_${locale}.xml`)
16 19
17 providers = [ 20 providers = [
18 { provide: TRANSLATIONS, useValue: translations }, 21 { provide: TRANSLATIONS, useValue: translations },