fix: add Indonesian (id-ID) language support and improve language selector (#24951)

This commit is contained in:
lyzno1
2025-09-02 14:44:59 +08:00
committed by GitHub
parent a32dde5428
commit 0caa94bd1c
32 changed files with 5074 additions and 21 deletions

View File

@@ -48,7 +48,7 @@ By default we will use `LanguagesSupported` to determine which languages are sup
```
cd web/i18n
cp -r en-US fr-FR
cp -r en-US id-ID
```
2. Modify the translation files in the new folder.
@@ -68,6 +68,8 @@ export type I18nText = {
'ru-RU': string
'it-IT': string
'uk-UA': string
'id-ID': string
'tr-TR': string
'YOUR_LANGUAGE_CODE': string
}
```
@@ -146,8 +148,8 @@ export const languages = [
{
value: 'id-ID',
name: 'Bahasa Indonesia',
example: 'Saluto, Dify!',
supported: false,
example: 'Halo, Dify!',
supported: true,
},
{
value: 'uk-UA',

View File

@@ -8,6 +8,7 @@ export type Item = {
export type I18nText = {
'en-US': string
'zh-Hans': string
'zh-Hant': string
'pt-BR': string
'es-ES': string
'fr-FR': string
@@ -16,16 +17,16 @@ export type I18nText = {
'ko-KR': string
'ru-RU': string
'it-IT': string
'th-TH': string
'id-ID': string
'uk-UA': string
'vi-VN': string
'de_DE': string
'zh_Hant': string
'ro-RO': string
'pl-PL': string
'hi-IN': string
'tr-TR': string
'fa-IR': string
'sl-SI': string
'th-TH': string
}
export const languages = data.languages
@@ -61,20 +62,25 @@ export const NOTICE_I18N = {
title: {
en_US: 'Important Notice',
zh_Hans: '重要公告',
zh_Hant: '重要公告',
pt_BR: 'Aviso Importante',
es_ES: 'Aviso Importante',
fr_FR: 'Avis important',
de_DE: 'Wichtiger Hinweis',
ja_JP: '重要なお知らせ',
ko_KR: '중요 공지',
pl_PL: 'Ważne ogłoszenie',
uk_UA: 'Важливе повідомлення',
ru_RU: 'Важное Уведомление',
vi_VN: 'Thông báo quan trọng',
it_IT: 'Avviso Importante',
th_TH: 'ประกาศสำคัญ',
id_ID: 'Pengumuman Penting',
uk_UA: 'Важливе повідомлення',
vi_VN: 'Thông báo quan trọng',
ro_RO: 'Anunț Important',
pl_PL: 'Ważne ogłoszenie',
hi_IN: 'महत्वपूर्ण सूचना',
tr_TR: 'Önemli Duyuru',
fa_IR: 'هشدار مهم',
sl_SI: 'Pomembno obvestilo',
th_TH: 'ประกาศสำคัญ',
},
desc: {
en_US:
@@ -101,6 +107,8 @@ export const NOTICE_I18N = {
'Наша система будет недоступна с 19:00 до 24:00 UTC 28 августа для обновления. По вопросам, пожалуйста, обращайтесь в нашу службу поддержки (support@dify.ai). Спасибо за ваше терпение',
vi_VN:
'Hệ thống của chúng tôi sẽ ngừng hoạt động từ 19:00 đến 24:00 UTC vào ngày 28 tháng 8 để nâng cấp. Nếu có thắc mắc, vui lòng liên hệ với nhóm hỗ trợ của chúng tôi (support@dify.ai). Chúng tôi đánh giá cao sự kiên nhẫn của bạn.',
id_ID:
'Sistem kami tidak akan tersedia dari 19:00 hingga 24:00 UTC pada 28 Agustus untuk pemutakhiran. Untuk pertanyaan, silakan hubungi tim dukungan kami (support@dify.ai). Kami menghargai kesabaran Anda.',
tr_TR:
'Sistemimiz, 28 Ağustos\'ta 19:00 ile 24:00 UTC saatleri arasında güncelleme nedeniyle kullanılamayacaktır. Sorularınız için lütfen destek ekibimizle iletişime geçin (support@dify.ai). Sabrınız için teşekkür ederiz.',
fa_IR:

View File

@@ -32,7 +32,7 @@
"value": "es-ES",
"name": "Español (España)",
"prompt_name": "Spanish",
"example": "Saluton, Dify!",
"example": "¡Hola, Dify!",
"supported": true
},
{
@@ -84,13 +84,6 @@
"example": "สวัสดี Dify!",
"supported": true
},
{
"value": "id-ID",
"name": "Bahasa Indonesia",
"prompt_name": "Indonesian",
"example": "Saluto, Dify!",
"supported": false
},
{
"value": "uk-UA",
"name": "Українська (Україна)",
@@ -124,14 +117,14 @@
"name": "Hindi (India)",
"prompt_name": "Hindi",
"example": "नमस्ते, Dify!",
"supported": "true"
"supported": true
},
{
"value": "tr-TR",
"name": "Türkçe",
"prompt_name": "Türkçe",
"example": "Selam!",
"supported": "true"
"supported": true
},
{
"value": "fa-IR",
@@ -146,6 +139,13 @@
"prompt_name": "Slovensko",
"example": "Zdravo, Dify!",
"supported": true
},
{
"value": "id-ID",
"name": "Bahasa Indonesia",
"prompt_name": "Indonesian",
"example": "Halo, Dify!",
"supported": true
}
]
}