I am compiling my project with:
ng serve --aot --i18nFile=client/locale/messages.fr.xlf --i18nFormat=xlf --locale=fr
How can I access the locale ID at runtime? I want to show/hide elements based on the locale.
PS. I do realise that using JIT compilation I can simply do this:
providers: [ { provide: LOCALE_ID, useValue: 'fr' } ]
But I'm looking for a AOT solution. I also would rather not infer locale based on hostname or anything like that.