@eui/core 13.1.21 → 13.1.22-snapshot-1677687339188

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -927,11 +927,12 @@ class I18nService extends EuiLazyService {
927
927
  this.translateService.setTranslation(this.translateService.currentLang, loadedResources.translations, true);
928
928
  })));
929
929
  // if the current language is different than the DEFAULT language
930
- if (this.translateService.currentLang !== this.translateService.defaultLang) {
930
+ const defaultLang = this.config.defaultLanguage || this.translateService.defaultLang;
931
+ if (this.translateService.currentLang !== defaultLang) {
931
932
  // manually load the resources for the default language and add them to the translate service
932
- langSubscription.push(i18nLoader.loadResources(resources, this.translateService.defaultLang)
933
+ langSubscription.push(i18nLoader.loadResources(resources, defaultLang)
933
934
  .pipe(take(1), tap((loadedResources) => {
934
- this.translateService.setTranslation(this.translateService.defaultLang, loadedResources.translations, true);
935
+ this.translateService.setTranslation(defaultLang, loadedResources.translations, true);
935
936
  })));
936
937
  }
937
938
  return forkJoin(langSubscription).pipe(map((loadedResourcesArr) => !loadedResourcesArr[0].hasError ?