feat: Complete multilingual interface with 10 languages including Korean

🌍 Added complete translation files:
- 🇪🇸 Spanish (es.json) - Español
- 🇫🇷 French (fr.json) - Français
- 🇩🇪 German (de.json) - Deutsch
- 🇮🇹 Italian (it.json) - Italiano
- 🇵🇹 Portuguese (pt.json) - Português
- 🇨🇳 Chinese (zh.json) - 中文
- 🇯🇵 Japanese (ja.json) - 日本語

🔧 Updated LocalizationService:
- All 10 languages loaded and initialized
- Updated supported languages list
- Enhanced language detection

��️ Enhanced UI:
- Extended language selection menu with all 10 languages
- Updated language names mapping in controllers
- Proper flag emojis for each language

💡 Features:
- Native translations for all UI elements
- Cultural appropriate pricing displays
- Proper date/currency formatting per locale
- Korean language support with proper hangul characters

Ready for global deployment with comprehensive language support!
This commit is contained in:
2025-09-13 09:19:13 +09:00
parent edddd52589
commit e81725e4d5
10 changed files with 859 additions and 3 deletions

View File

@@ -23,6 +23,14 @@ export class LocalizationService {
const localesPath = path.join(__dirname, '..', 'locales');
const ruTranslations = JSON.parse(fs.readFileSync(path.join(localesPath, 'ru.json'), 'utf8'));
const enTranslations = JSON.parse(fs.readFileSync(path.join(localesPath, 'en.json'), 'utf8'));
const esTranslations = JSON.parse(fs.readFileSync(path.join(localesPath, 'es.json'), 'utf8'));
const frTranslations = JSON.parse(fs.readFileSync(path.join(localesPath, 'fr.json'), 'utf8'));
const deTranslations = JSON.parse(fs.readFileSync(path.join(localesPath, 'de.json'), 'utf8'));
const itTranslations = JSON.parse(fs.readFileSync(path.join(localesPath, 'it.json'), 'utf8'));
const ptTranslations = JSON.parse(fs.readFileSync(path.join(localesPath, 'pt.json'), 'utf8'));
const zhTranslations = JSON.parse(fs.readFileSync(path.join(localesPath, 'zh.json'), 'utf8'));
const jaTranslations = JSON.parse(fs.readFileSync(path.join(localesPath, 'ja.json'), 'utf8'));
const koTranslations = JSON.parse(fs.readFileSync(path.join(localesPath, 'ko.json'), 'utf8'));
await i18next.init({
lng: 'ru', // Язык по умолчанию
@@ -34,6 +42,30 @@ export class LocalizationService {
},
en: {
translation: enTranslations
},
es: {
translation: esTranslations
},
fr: {
translation: frTranslations
},
de: {
translation: deTranslations
},
it: {
translation: itTranslations
},
pt: {
translation: ptTranslations
},
zh: {
translation: zhTranslations
},
ja: {
translation: jaTranslations
},
ko: {
translation: koTranslations
}
},
interpolation: {
@@ -62,7 +94,7 @@ export class LocalizationService {
}
public getSupportedLanguages(): string[] {
return ['ru', 'en'];
return ['ru', 'en', 'es', 'fr', 'de', 'it', 'pt', 'zh', 'ja', 'ko'];
}
// Получить перевод для определенного языка без изменения текущего