File size: 1,363 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import I18NContext from './context';
import i18n from './default-i18n';
import I18N from './i18n';
import localize from './localize';
import { useRtl, withRtl } from './rtl';
import useTranslate from './use-translate';

export { I18N, I18NContext, localize, useRtl, withRtl, useTranslate };
export default i18n;

// Export the default instance's properties and bound methods for convenience
// These should be deprecated eventually, exposing only the default `i18n` instance
export const translate = i18n.translate.bind( i18n );
export const configure = i18n.configure.bind( i18n );
export const setLocale = i18n.setLocale.bind( i18n );
export const getLocale = i18n.getLocale.bind( i18n );
export const getLocaleSlug = i18n.getLocaleSlug.bind( i18n );
export const getLocaleVariant = i18n.getLocaleVariant.bind( i18n );
export const getBrowserSafeLocale = i18n.getBrowserSafeLocale.bind( i18n );
export const isRtl = i18n.isRtl.bind( i18n );
export const addTranslations = i18n.addTranslations.bind( i18n );
export const reRenderTranslations = i18n.reRenderTranslations.bind( i18n );
export const registerComponentUpdateHook = i18n.registerComponentUpdateHook.bind( i18n );
export const registerTranslateHook = i18n.registerTranslateHook.bind( i18n );
export const state = i18n.state;
export const fixMe = i18n.fixMe.bind( i18n );

export type * from './types';