We haven an Angular application that requires authentication. It’s done using OpenID Connect with an IdentityServer4 auth server.
Now we want to add additional languages. The language to be used is stored in the user profile we can fetch from our auth server.
Problem: Angular builds one application for each language so I need to know the language before loading the app, but authentication is done during app startup and I don’t know the user’s language before.
Is there any common approach / best practice how to setup an angular app with multiple languages and Open ID Connect?
I know one option would be to use ngx-translate, but it’s deprecated and I’d prefer to stay with the Angular tooling. I also saw, that current angular version support runtime translations but it seems to be still a beta version and not officially released. I’d prefer the "localization during compile time" approach for performance reasons – but I simply cannot find any approach to make this work…
- Angular 10 behind nginx kubernetes ingress
- Asp.NET core app with IdentityServer4 as oidc server