You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### 1. Setup the `TranslateModule` to use the `MultiTranslateHttpLoader`:
33
30
34
31
The `MultiTranslateHttpLoader` uses HttpClient to load translations, which means that you have to import the HttpClientModule from `@angular/common/http` before the `TranslateModule`:
@@ -63,17 +64,20 @@ export function HttpLoaderFactory(http: HttpClient) {
63
64
exportclassAppModule { }
64
65
```
65
66
66
-
The `MultiTranslateHttpLoader`also has two optional parameters:
67
+
The `MultiTranslateHttpLoader`takes a list of translation file configurations. Each configuration has two optional parameters:
67
68
- prefix: string = "/assets/i18n/"
68
69
- suffix: string = ".json"
69
70
70
71
By using those default parameters, it will load your translations files for the lang "en" from: `/assets/i18n/en.json`.
71
72
72
-
You can change those in the `HttpLoaderFactory` method that we just defined. For example if you want to load the "en" translations from `/public/lang-files/en-lang.json` you would use:
73
+
You can change those in the `HttpLoaderFactory` method that we just defined. For example if you want to load the "en" translations from `/assets/translate/core/en.json` and `/assets/translate/shared/en.json` you would use:
0 commit comments