Reputation: 31
I am currently having an general question in regards of External Configuration Files within Angular (e.g. Localization Files). Is it possible to store e.g. the Localization File externally somewhere within my OpenShift Configuration and load this configuration file at the Container start?. Are there any disadvantages to not store them within the Code directly (e.g. more complex to implement / load)?
Upvotes: 1
Views: 416
Reputation: 1037
The official/traditional Angular way is to compile each language version as a separate deployment package. This has an disadvantage that you need to deploy each language variant into separate URL. For example
Starting from Angular 10 it is possible to compile one universal app bundle and to load translation on run time. Unfortunately Angular does not have any API to do to actual loading. You have to implement it yourself or use some 3rd party API. For example Soluling.
https://github.com/soluling/I18N/tree/master/Library/Angular
Upvotes: 1