title: How to initialize keycloak with locale in i18n Angular app?
body: <p>We use keycloak [<a href="https://www.keycloak.org/]" rel="nofollow noreferrer">https://www.keycloak.org/]</a> server for user authentication in our Angular 6 app. We also use this wrapper library <a href="https://github.com/mauriciovigolo/keycloak-angular" rel="nofollow noreferrer">https://github.com/mauriciovigolo/keycloak-angular</a> to interact with the underneath JavaScript keycloak Adapter and initialization.</p>
  
  <p>Keycloak is the first thing in the app that gets initialized (from provided configuration) via Angular's APP_INITIALIZER provider.  </p>
  
  <p>Since we use Angular with internationalization and ahead of time compilation, we have deployed our apps like this:</p>
  
  <pre>
     https://my-site/en
     https://my-site/fr
  </pre>
  
  <p>I want to render login page in respective locale when navigated. If navigated to my-site/fr keycloak login page should render in french and so on. But there is no way to provide locale in keyclaok config while app initialization.</p>
  
  <p>PS: Keycloak realm is already configured to allow internationalization and user can change language from login page. I know keycloak adapter's login method takes "locale" param but I can only access that after app has been initialized. </p>
  
  <p>Has anyone encountered this problem?</p>
  
  <p>Thank you</p>