WIP: Arabic localization.|

This commit is contained in:
a.bouhuolia
2021-06-10 12:51:00 +02:00
parent 4fc7c37260
commit 1ea32884c2
465 changed files with 3299 additions and 2109 deletions

View File

@@ -17,6 +17,8 @@ http.interceptors.request.use((request) => {
if (locale) {
request.headers.common['Accept-Language'] = locale;
}
request.headers.common['Accept-Language'] = 'ar';
return request;
}, (error) => {
return Promise.reject(error);

View File

@@ -1,13 +1,15 @@
import { createIntl, createIntlCache } from 'react-intl';
// import messages from 'lang/en/index.json';
import messages from 'lang/ar/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
// This is optional but highly recommended since it prevents memory leak
const cache = createIntlCache();
// Creates globa intl instance.
const intl = createIntl(
{
locale: 'en',