import langDefault from './lang/enUK' ; let lang = langDefault ; export const i18n = ( translations ) => { lang = { ... langDefault , ... translations } ; } ; export const t = ( term ) => { const properties = term . split ( "." ) ; let text = lang ; properties . forEach ( p => { text = text [ p ] ; } ) ; return text ; } ; export default { i18n , t } ;