This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"main.header.welcome": "Welcome", | |
"main.page.title": "{{title}} is running!", | |
"main.page.section.languages.title": "Languages", | |
"main.page.section.languages.subtitle": "Lets try to change language!", | |
"main.page.section.languages.english": "English", | |
"main.page.section.languages.french": "Français" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
export function initApp(http: HttpClient, translate: TranslateService) { | |
return () => new Promise<boolean>((resolve: (res: boolean) => void) => { | |
const defaultLocale = 'en'; | |
http.get(`/assets/i18n/dev.json`).pipe( | |
catchError(() => of(null)) | |
).subscribe((devKeys: any) => { | |
translate.setTranslation(defaultLocale, devKeys || {}); |
NewerOlder