fix dutch language selection
This commit is contained in:
@@ -13,6 +13,7 @@ JSON-based translation system. Translations are loaded from static files, cached
|
|||||||
| Portuguese | `pt` | `static/locales/pt.json` |
|
| Portuguese | `pt` | `static/locales/pt.json` |
|
||||||
| Persian | `fa` | `static/locales/fa.json` |
|
| Persian | `fa` | `static/locales/fa.json` |
|
||||||
| Chinese | `zh` | `static/locales/zh.json` |
|
| Chinese | `zh` | `static/locales/zh.json` |
|
||||||
|
| Dutch | `nl` | `static/locales/nl.json` |
|
||||||
|
|
||||||
Default locale: **en** (English).
|
Default locale: **en** (English).
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ let currentLocale =
|
|||||||
|
|
||||||
// Supported locales (languages that have locale files on the server)
|
// Supported locales (languages that have locale files on the server)
|
||||||
// When a locale file is not found, the system gracefully falls back to English
|
// When a locale file is not found, the system gracefully falls back to English
|
||||||
const supportedLocales = ['en', 'es', 'zh', 'fa', 'fr', 'de', 'pt'];
|
const supportedLocales = ['en', 'es', 'zh', 'fa', 'fr', 'de', 'pt', 'nl'];
|
||||||
|
|
||||||
// Fallback to English if locale is not supported
|
// Fallback to English if locale is not supported
|
||||||
if (!supportedLocales.includes(currentLocale)) {
|
if (!supportedLocales.includes(currentLocale)) {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ function getAvailableLanguages() {
|
|||||||
{ code: 'de', name: 'Deutsch', flag: '🇩🇪' },
|
{ code: 'de', name: 'Deutsch', flag: '🇩🇪' },
|
||||||
{ code: 'pt', name: 'Português', flag: '🇧🇷' },
|
{ code: 'pt', name: 'Português', flag: '🇧🇷' },
|
||||||
{ code: 'it', name: 'Italiano', flag: '🇮🇹' }
|
{ code: 'it', name: 'Italiano', flag: '🇮🇹' }
|
||||||
|
{ code: 'nl', name: 'Nederlands', flag: '🇳🇱' }
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user