import { Bootstrap , injectable } from '@cloudbeaver/core-di' ; import { LocalizationService } from '@cloudbeaver/core-localization' ; @ injectable ( ) export class LocaleService extends Bootstrap { constructor ( private localizationService ) { super ( ) ; } register ( ) { this . localizationService . addProvider ( this . provider . bind ( this ) ) ; } load ( ) { } private async provider ( locale ) { switch ( locale ) { case 'ru' : return ( await import ( './locales/ru' ) ) . default ; case 'it' : return ( await import ( './locales/it' ) ) . default ; case 'zh' : return ( await import ( './locales/zh' ) ) . default ; default : return ( await import ( './locales/en' ) ) . default ; } } }