From: Dessalines Date: Mon, 1 Mar 2021 21:20:08 +0000 (-0500) Subject: Adding thai language. X-Git-Url: http://these/git/%22https:/nerdica.net/static/%22%7B%7D/%22?a=commitdiff_plain;h=aea005b4ccdcf4b4353769147920ee45e946bd53;p=lemmy-ui.git Adding thai language. --- diff --git a/src/shared/i18next.ts b/src/shared/i18next.ts index 9928903..8f30005 100644 --- a/src/shared/i18next.ts +++ b/src/shared/i18next.ts @@ -31,6 +31,7 @@ import { sr_Latn } from "./translations/sr_Latn"; import { da } from "./translations/da"; import { oc } from "./translations/oc"; import { hr } from "./translations/hr"; +import { th } from "./translations/th"; // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 const resources = { @@ -65,6 +66,7 @@ const resources = { da, oc, hr, + th, }; function format(value: any, format: any): any { diff --git a/src/shared/utils.ts b/src/shared/utils.ts index cb7569d..887030f 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -118,6 +118,7 @@ export const languages = [ { code: "sv", name: "Svenska" }, { code: "sq", name: "Shqip" }, { code: "sr_Latn", name: "srpski" }, + { code: "th", name: "ภาษาไทย" }, { code: "tr", name: "Türkçe" }, { code: "uk", name: "Українська Mова" }, { code: "ru", name: "Русский" }, @@ -445,6 +446,8 @@ export function getMomentLanguage(): string { lang = "oc"; } else if (lang.startsWith("hr")) { lang = "hr"; + } else if (lang.startsWith("th")) { + lang = "th"; } else { lang = "en"; }