UNPKG

react-i18next

Version:

Internationalization for react done right. Using the i18next i18n ecosystem.

22 lines (18 loc) 752 B
import { unescape } from './unescape.js'; let defaultOptions = { bindI18n: 'languageChanged', bindI18nStore: '', // nsMode: 'fallback' // loop through all namespaces given to hook, HOC, render prop for key lookup transEmptyNodeValue: '', transSupportBasicHtmlNodes: true, transWrapTextNodes: '', transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'], // hashTransKey: key => key // calculate a key for Trans component based on defaultValue useSuspense: true, unescape, transDefaultProps: undefined, // { tOptions: {}, shouldUnescape: false, values: {}, components: [] } }; export const setDefaults = (options = {}) => { defaultOptions = { ...defaultOptions, ...options }; }; export const getDefaults = () => defaultOptions;