mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
Update IntlProvider.tsx
This commit is contained in:
parent
3b420b7f4a
commit
337b9c65ae
@ -3,6 +3,7 @@ import { createIntl, createIntlCache } from "react-intl";
|
||||
import langDe from "./lang/de.json";
|
||||
import langEn from "./lang/en.json";
|
||||
import langFa from "./lang/fa.json";
|
||||
import langAR from "./lang/ar.json";
|
||||
import langList from "./lang/lang-list.json";
|
||||
|
||||
// first item of each array should be the language code,
|
||||
@ -12,6 +13,7 @@ const localeOptions = [
|
||||
["en", "en-US"],
|
||||
["de", "de-DE"],
|
||||
["fa", "fa-IR"],
|
||||
["ar", "ar-SA"],
|
||||
];
|
||||
|
||||
const loadMessages = (locale?: string): typeof langList & typeof langEn => {
|
||||
@ -21,6 +23,8 @@ const loadMessages = (locale?: string): typeof langList & typeof langEn => {
|
||||
return Object.assign({}, langList, langEn, langDe);
|
||||
case "fa":
|
||||
return Object.assign({}, langList, langEn, langFa);
|
||||
case "ar":
|
||||
return Object.assign({}, langList, langEn, langAR);
|
||||
default:
|
||||
return Object.assign({}, langList, langEn);
|
||||
}
|
||||
@ -34,6 +38,9 @@ const getFlagCodeForLocale = (locale?: string) => {
|
||||
case "fa-IR":
|
||||
case "fa":
|
||||
return "IR";
|
||||
case "ar-SA":
|
||||
case "ar":
|
||||
return "AR";
|
||||
default:
|
||||
return "US";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user