mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
WIP: arabic localization.
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
import { createIntl, createIntlCache } from 'react-intl';
|
||||
// import messages from 'lang/en/index.json';
|
||||
import arabicMessages from 'lang/ar/index.json';
|
||||
import englishMessages from 'lang/en/index.json';
|
||||
|
||||
import { setLocale } from 'yup';
|
||||
import { locale } from 'lang/en/locale';
|
||||
|
||||
// This is optional but highly recommended since it prevents memory leak
|
||||
const cache = createIntlCache();
|
||||
|
||||
// Creates globa intl instance.
|
||||
const intl = createIntl(
|
||||
{
|
||||
locale: 'en',
|
||||
messages,
|
||||
},
|
||||
cache,
|
||||
);
|
||||
|
||||
setLocale(locale);
|
||||
|
||||
const { formatMessage } = intl;
|
||||
|
||||
export { formatMessage };
|
||||
|
||||
export default intl;
|
||||
Reference in New Issue
Block a user