Adding thai language.

This commit is contained in:
Dessalines 2021-03-01 16:20:08 -05:00
parent 2e2b18c717
commit aea005b4cc
2 changed files with 5 additions and 0 deletions

View file

@ -31,6 +31,7 @@ import { sr_Latn } from "./translations/sr_Latn";
import { da } from "./translations/da"; import { da } from "./translations/da";
import { oc } from "./translations/oc"; import { oc } from "./translations/oc";
import { hr } from "./translations/hr"; import { hr } from "./translations/hr";
import { th } from "./translations/th";
// https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66
const resources = { const resources = {
@ -65,6 +66,7 @@ const resources = {
da, da,
oc, oc,
hr, hr,
th,
}; };
function format(value: any, format: any): any { function format(value: any, format: any): any {

View file

@ -118,6 +118,7 @@ export const languages = [
{ code: "sv", name: "Svenska" }, { code: "sv", name: "Svenska" },
{ code: "sq", name: "Shqip" }, { code: "sq", name: "Shqip" },
{ code: "sr_Latn", name: "srpski" }, { code: "sr_Latn", name: "srpski" },
{ code: "th", name: "ภาษาไทย" },
{ code: "tr", name: "Türkçe" }, { code: "tr", name: "Türkçe" },
{ code: "uk", name: "Українська Mова" }, { code: "uk", name: "Українська Mова" },
{ code: "ru", name: "Русский" }, { code: "ru", name: "Русский" },
@ -445,6 +446,8 @@ export function getMomentLanguage(): string {
lang = "oc"; lang = "oc";
} else if (lang.startsWith("hr")) { } else if (lang.startsWith("hr")) {
lang = "hr"; lang = "hr";
} else if (lang.startsWith("th")) {
lang = "th";
} else { } else {
lang = "en"; lang = "en";
} }