feat: add Thai translation (#264)

* Create th.ts

Created i18n Thai translation file.

* Update translation.ts

Added Thai language support.

* Update config.ts

Added Spanish (es) and Thai (th) to commented possible values for `lang` key.

* Create README.th.md

Created Thai version of README.

* Update README.md

Added navigation/link to Thai version of README.
This commit is contained in:
twystpaki
2024-12-31 16:02:23 +07:00
committed by GitHub
parent 4483433dd7
commit 588a536e87
5 changed files with 104 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ import { en } from './languages/en'
import { es } from './languages/es'
import { ja } from './languages/ja'
import { ko } from './languages/ko'
import { th } from './languages/th'
import { zh_CN } from './languages/zh_CN'
import { zh_TW } from './languages/zh_TW'
@@ -25,6 +26,8 @@ const map: { [key: string]: Translation } = {
ja_jp: ja,
ko: ko,
ko_kr: ko,
th: th,
th_th: th,
}
export function getTranslation(lang: string): Translation {
@@ -34,4 +37,4 @@ export function getTranslation(lang: string): Translation {
export function i18n(key: I18nKey): string {
const lang = siteConfig.lang || 'en'
return getTranslation(lang)[key]
}
}