Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const i18n = messages => (key, args) => {
const t = translatejs(messages, options)
return args ? m.trust(t(key, args)) : t(key)
}
export function translate() {
const state = appState.getState();
const lang = state.lang;
const t = translatejs(messages[lang], [options]);
return t.apply(null, arguments);
}