title: Angular: how to use ngx-translate in root component?
body: <p>I want to set global setting for ng-select, the &quot;notFoundText&quot; as translated value by ngx-translate TranslateService:</p>
  <pre><code>export class AppComponent {
    constructor(
      public translate: TranslateService,
      private readonly ngSelectConfig: NgSelectConfig
    ) {
      translate.addLangs(['pl-PL']);
      translate.setDefaultLang('pl-PL');
  
      this.ngSelectConfig.notFoundText =
        this.translate.instant('GENERAL.NO_DATA');
    }
  }
  </code></pre>
  <p>In this implementation, <code>translate.instant()</code> returns &quot;GENERAL.NO_DATA&quot; instead of translated text. It works in several places (also in several modules, so generally my configuration works), but it does not work in root component. 'GENERAL.NO_DATA' also exists in my JSON file, because i'm using it for a long time.</p>
  <p>How can I use TranslateService in this component?</p>