Open yuriykuzin opened 7 years ago
+1
+1
@stgunholy @yuriykuzin after looking at the source code currently it's not supported
this would be really great to have. I currently have angular1 with angular-translate and we have like 6000 rows of localisation files and combining it into one file is like suicide...
+1
+1
+1
+1
+1
+1
This should have been out by now.
There should be a wiki page IMO with description on how to create own loader.
+1
+1
+1
I would like for my components to load their translations via http instead of doing it by module. So I guess it fits in with this request.
+1
+1
same need here +1
+1 TranslateHttpLoader override all translation set by setTranslation() before. Set an option for merging.
As a workaround you can create your own TranslateLoader that loads and combines various sources for you. See the http-loader for an example, the interface is super-simple to implement.
Also see https://github.com/denniske/ngx-translate-multi-http-loader
@svemir Tried with ngx-translate-multi-http-loader. As per the code, we need to define all modules ( core, shared etc) in app.module.ts however, I am using module loading with ngx translate.
e.g. this.translate.use(language + '/' + module);
so for the dashboard page, I am using this.translate.use('en/dashboard');
where this.translate is instance of TranslationService of ngx-translate.
How can I also include some other JSON in dashboard page?
e.g.
this.translate.use('en/dashboard');
this.translate.use('en/common');
Hi!
Can you please advise how can add additional translation files from some lazy loaded AOT module / library?
As an example, I have basic en.json in my application and want to add additional translations from my-library-en.json inside MyLibraryModule.
Thanks in advance!