feat(i18n): add Korean locale (#531)

Add a Korean message catalog covering every key in the English catalog,
with placeholders matching English for each message. Register ko in the
inlang project, accept it as a sign-up and saved user locale, and offer it
in the sign-up language switch and the team settings language select.

Co-authored-by: phj1081 <5908832+phj1081@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Eyejoker
2026-11-16 18:48:01 +08:00
committed by GitHub
co-authored by phj1081 Claude
parent 2be1093b91
commit d255e76806
10 changed files with 1694 additions and 39 deletions
+1
View File
@@ -241,6 +241,7 @@
"select_language": "Select Language",
"english": "English",
"chinese": "简体中文 (Chinese)",
"korean": "한국어 (Korean)",
"language_updated": "Language updated successfully",
"failed_update_language": "Failed to update language",
"avatar_updated": "Avatar updated successfully",
File diff suppressed because it is too large Load Diff
+1
View File
@@ -241,6 +241,7 @@
"select_language": "选择语言",
"english": "English",
"chinese": "简体中文 (Chinese)",
"korean": "한국어 (Korean)",
"language_updated": "语言更新成功",
"failed_update_language": "语言更新失败",
"avatar_updated": "头像更新成功",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"baseLocale": "en",
"locales": ["en", "zh"],
"locales": ["en", "zh", "ko"],
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js"
+4 -1
View File
@@ -199,7 +199,10 @@ export const Route = createRootRouteWithContext<MyRouterContext>()({
try {
await fetchMetadata(teamId)
const savedLocale = getMetadata<string>('locale')
if ((savedLocale === 'en' || savedLocale === 'zh') && savedLocale !== getLocale()) {
if (
(savedLocale === 'en' || savedLocale === 'zh' || savedLocale === 'ko') &&
savedLocale !== getLocale()
) {
setLocale(savedLocale, { reload: false })
}
} catch (e) {
+13 -3
View File
@@ -31,12 +31,12 @@ function SignupPage() {
const inviteCode = (search as { inviteCode?: string }).inviteCode
const [error, setError] = useState<string | null>(null)
const [loading, setLoading] = useState(false)
const [locale, setLocaleState] = useState<'en' | 'zh'>(() => {
const [locale, setLocaleState] = useState<'en' | 'zh' | 'ko'>(() => {
const activeLocale = getLocale()
return activeLocale === 'zh' ? 'zh' : 'en'
return activeLocale === 'zh' || activeLocale === 'ko' ? activeLocale : 'en'
})
const handleLocaleChange = (newLocale: 'en' | 'zh') => {
const handleLocaleChange = (newLocale: 'en' | 'zh' | 'ko') => {
setLocaleState(newLocale)
setLocale(newLocale)
}
@@ -280,6 +280,16 @@ function SignupPage() {
>
中文
</button>
<span className="text-zinc-300 dark:text-zinc-850">/</span>
<button
type="button"
onClick={() => handleLocaleChange('ko')}
className={`cursor-pointer hover:text-zinc-800 dark:hover:text-zinc-200 transition-colors ${
locale === 'ko' ? 'font-bold text-rose-500 dark:text-rose-400' : ''
}`}
>
한국어
</button>
</div>
</div>
</AuthLayout>
@@ -254,7 +254,7 @@ export function TeamSettingsPage() {
const currentLocale = getMetadata<string>('locale') || getLocale()
const handleLanguageChange = async (newLocale: string) => {
if (newLocale === 'en' || newLocale === 'zh') {
if (newLocale === 'en' || newLocale === 'zh' || newLocale === 'ko') {
try {
await setMetadata(teamId, 'locale', newLocale)
setLocale(newLocale)
@@ -957,6 +957,7 @@ export function TeamSettingsPage() {
<SelectContent>
<SelectItem value="en">{m.english()}</SelectItem>
<SelectItem value="zh">{m.chinese()}</SelectItem>
<SelectItem value="ko">{m.korean()}</SelectItem>
</SelectContent>
</Select>
</div>