Closed sriram275 closed 3 months ago
There is way we can add feature module resources using addResourceBundle https://www.i18next.com/overview/api#addresourcebundle But is there way we can dynamically make http call and return that strings.
@sriram275
Option 1: You can easilly get your json by REST call and add it with an addResourceBundle. It is easy. And you can remove it if you need. So you have full control
Option 2: Look at i18nextNamespaces
in docs in combination with i18next-http-backend
. May be this fit for your case. It loads namespaces dynamicaly and it is implemented in the demo app.
is there we can load translations after init?
This is something like we do customTranslateLoader with ngx-translate TranslateModule.forChild({})
Context is -> We have more angular projects as MFEs and load all in shell where we do initialize i18next. We want to load each project translations after init, is there way we can load translations in feature module.