import { i18n , i18nLoader } from '@kbn/i18n' ; export const initTranslations = async ( locale , translationFiles ) => { i18nLoader . registerTranslationFiles ( translationFiles ) ; const translations = await i18nLoader . getTranslationsByLocale ( locale ) ; i18n . init ( Object . freeze ( { locale , ... translations , } ) ) ; } ;