@larscom/ngx-translate-module-loader
Advanced tools
Comparing version 3.0.3 to 3.0.4
{ | ||
"name": "@larscom/ngx-translate-module-loader", | ||
"version": "3.0.3", | ||
"version": "3.0.4", | ||
"description": "Highly configurable and flexible translations loader for ngx-translate. Fetch multiple translations, each translation file gets it's own namespace by default", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -27,2 +27,9 @@ # @larscom/ngx-translate-module-loader | ||
Choose the version corresponding to your Angular version: | ||
| @angular/core | @larscom/ngx-translate-module-loader | | ||
| ------------- | ------------------------------------ | | ||
| >= 12 | >= 3.0.0 | | ||
| < 12 | <= 2.2.0 | | ||
```bash | ||
@@ -75,3 +82,7 @@ npm i --save @larscom/ngx-translate-module-loader | ||
}) | ||
export class AppModule {} | ||
export class AppModule { | ||
constructor(readonly translate: TranslateService) { | ||
translate.setDefaultLang('en'); | ||
} | ||
} | ||
``` | ||
@@ -115,15 +126,16 @@ | ||
{ | ||
"KEY": "VALUE", | ||
"FEATURE1" : { | ||
"KEY": "VALUE" | ||
}, | ||
"FEATURE2" : { | ||
"KEY": "VALUE" | ||
} | ||
"KEY": "VALUE", | ||
"FEATURE1": { | ||
"KEY": "VALUE" | ||
}, | ||
"FEATURE2": { | ||
"KEY": "VALUE" | ||
} | ||
} | ||
``` | ||
Even though all JSON files from those modules are the same, they don't conflict because they are not on the same level after they get merged. | ||
## Configuration | ||
## Configuration | ||
The configuration is very flexible, you can even define custom templates for fetching translations. | ||
@@ -154,3 +166,3 @@ | ||
*/ | ||
version?: string | number; | ||
version?: string | number; | ||
/** | ||
@@ -157,0 +169,0 @@ * Function that gets executed if an error occurred while retrieving a translation file |
59942
243