Skip to content

Commit

Permalink
Update deviceLocales.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
auroursa committed Dec 23, 2024
1 parent c9718e1 commit 0a820a0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/locale/deviceLocales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,11 @@ export function getLocales() {
}

if (typeof locale.languageTag === 'string') {
if (
locale.languageTag === 'zh-CN' ||
locale.languageTag.startsWith('zh-Hans')
) {
if (locale.languageTag === 'zh-CN') {
// Simplified Chinese to zh-Hans-CN
locale.languageTag = 'zh-Hans-CN'
}
if (
locale.languageTag === 'zh-TW' ||
locale.languageTag.startsWith('zh-Hant')
) {
if (locale.languageTag === 'zh-TW') {
// Traditional Chinese to zh-Hant-TW
locale.languageTag = 'zh-Hant-TW'
}
Expand Down

0 comments on commit 0a820a0

Please sign in to comment.