I have a Angular app that I am trying to localize. What I have so far is that all my displayed values are located in a single json file (stringResources.json)
. After translation I will have multiple files, one for each of the languages that I want to support (i.e en.json
, fr.json
ect). I use AOT compilation so my options seem to be
- Use ngx-translate
- Follow documentation and pre-build a separate application for each language
What I did was to generate multiple builds by using this package to output a different build for every language file, and each of these builds work well. I cannot seem to figure out how to do the server side logic to deliver the correct package based on url or language detection
I have 2 questions:
1) What would be the best way to make my app support l10n(localization)? It seems I have no need to go into Angular's built in i18n, since I already have the string files extracted and available?
2) What are some resources I can look into to figure out the server side logic and how to organize the structure for the different builds? I have tried changing the web.config file but that seems it will interfere with the app's routing logic