WIP: arabic localization.

This commit is contained in:
a.bouhuolia
2021-06-10 14:27:53 +02:00
parent 40c6a1ccbc
commit c66e86fbd5
10 changed files with 8 additions and 36 deletions

View File

@@ -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;