mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
38 lines
769 B
Plaintext
38 lines
769 B
Plaintext
import { I18nProvider } from "@refinedev/core";
|
|
|
|
/**
|
|
* Check out the I18n Provider documentation for detailed information
|
|
* https://refine.dev/docs/api-reference/core/providers/i18n-provider/
|
|
**/
|
|
export const i18nProvider: I18nProvider = {
|
|
translate: (key: string, options?: any, defaultMessage?: string) => {
|
|
console.log("translate", {
|
|
key,
|
|
options,
|
|
defaultMessage,
|
|
});
|
|
|
|
// TODO: do the translation
|
|
|
|
return defaultMessage || "";
|
|
},
|
|
|
|
changeLocale: (lang: string, options?: any) => {
|
|
console.log("changeLocale", {
|
|
lang,
|
|
options,
|
|
});
|
|
|
|
// TODO: change the locale
|
|
|
|
return Promise.resolve();
|
|
},
|
|
getLocale: () => {
|
|
console.log("getLocale");
|
|
|
|
// TODO: get the locale
|
|
|
|
return "en";
|
|
},
|
|
};
|