LFFE-8 Localization of charts and make a HOC component

This commit is contained in:
2023-11-04 11:37:33 +03:30
parent d5dd75cfb2
commit d93c9c1653
6 changed files with 385 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import {FA_DATATABLE_LOCALIZATION} from "&/locales/fa/datatable";
import {FA_CHART_LOCALIZATION} from "&/locales/fa/chart";
import {useRouter} from "next/router";
import {createContext, useEffect, useState} from "react";
import useUser from "../hooks/useUser";
@@ -14,6 +15,7 @@ export const LanguageProvider = ({children}) => {
name: "فارسی",
fontFamily: `IRANSans, sans-serif`,
tableLocalization: FA_DATATABLE_LOCALIZATION,
chartLocalization: FA_CHART_LOCALIZATION
}
];
const {user, userChangedLanguage, changeLanguageState} = useUser();