title: Setting LOCALE_ID from Observable Service
body: <p>I have a service that provides the global app language as follows:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>export class LanguageService {
    private currentLanguage$ = new ReplaySubject &lt; string &gt; ();
  
    getCurrentLanguage(): Observable &lt; string &gt; {
      return this.currentLanguage$.asObservable();
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I use this service to provide language switching on the fly throughout the app. All components respect the language provided by the function above ('en', 'fr', etc.) and I wanted the <code>CurrencyPipe</code> to also do so.</p>
  
  <p>As I understood I can provide this via <code>LOCALE_ID</code>, but I cannot find examples or guidance on how to do so in the docs, and especially not on how to provide it using an observable.</p>