aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app.module.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/app.module.ts')
-rw-r--r--client/src/app/app.module.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts
index 44552021f..9992b9c44 100644
--- a/client/src/app/app.module.ts
+++ b/client/src/app/app.module.ts
@@ -17,6 +17,7 @@ import { SharedModule } from './shared'
17import { SignupModule } from './signup' 17import { SignupModule } from './signup'
18import { VideosModule } from './videos' 18import { VideosModule } from './videos'
19import { buildFileLocale, getDefaultLocale } from '../../../shared/models/i18n' 19import { buildFileLocale, getDefaultLocale } from '../../../shared/models/i18n'
20import { environment } from '../environments/environment'
20 21
21export function metaFactory (serverService: ServerService): MetaLoader { 22export function metaFactory (serverService: ServerService): MetaLoader {
22 return new MetaStaticLoader({ 23 return new MetaStaticLoader({
@@ -66,6 +67,11 @@ export function metaFactory (serverService: ServerService): MetaLoader {
66 { 67 {
67 provide: TRANSLATIONS, 68 provide: TRANSLATIONS,
68 useFactory: (locale) => { 69 useFactory: (locale) => {
70 // On dev mode, test locales
71 if (environment.production === false && window.location.search === '?lang=fr') {
72 return require(`raw-loader!../locale/target/messages_fr.xml`)
73 }
74
69 const fileLocale = buildFileLocale(locale) 75 const fileLocale = buildFileLocale(locale)
70 76
71 // Default locale, nothing to translate 77 // Default locale, nothing to translate