mirror of
https://github.com/saicaca/fuwari.git
synced 2026-01-12 07:12:52 +01:00
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:
@@ -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]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user