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