feat(i18n): add French language support and enhance localization
All checks were successful
Deploy to production / deploy (push) Successful in 2m48s

- Introduced French as a supported language across the application, updating locale files and adding translations for various components.
- Enhanced language handling logic to accommodate French, ensuring proper detection and fallback mechanisms.
- Updated UI elements to include French language options, improving accessibility for French-speaking users.
- Refactored SEO handling to include French in hreflang links, enhancing search engine indexing for multilingual content.
- Added new scripts for managing French translations and ensuring consistency across language files.
This commit is contained in:
Torsten Schulz (local)
2026-04-07 18:04:03 +02:00
parent f715c6125d
commit f7030bbabe
56 changed files with 5220 additions and 175 deletions

View File

@@ -80,6 +80,26 @@ import esMessage from './locales/es/message.json';
import esPersonal from './locales/es/personal.json';
import esSeo from './locales/es/seo.json';
import frGeneral from './locales/fr/general.json';
import frHeader from './locales/fr/header.json';
import frNavigation from './locales/fr/navigation.json';
import frHome from './locales/fr/home.json';
import frChat from './locales/fr/chat.json';
import frRegister from './locales/fr/register.json';
import frError from './locales/fr/error.json';
import frActivate from './locales/fr/activate.json';
import frSettings from './locales/fr/settings.json';
import frAdmin from './locales/fr/admin.json';
import frSocialNetwork from './locales/fr/socialnetwork.json';
import frFriends from './locales/fr/friends.json';
import frFalukant from './locales/fr/falukant.json';
import frPasswordReset from './locales/fr/passwordReset.json';
import frBlog from './locales/fr/blog.json';
import frMinigames from './locales/fr/minigames.json';
import frMessage from './locales/fr/message.json';
import frPersonal from './locales/fr/personal.json';
import frSeo from './locales/fr/seo.json';
function isPlainObject(value) {
return value !== null && typeof value === 'object' && !Array.isArray(value);
}
@@ -212,14 +232,36 @@ const messages = {
...esMessage,
...esPersonal,
...esSeo,
}
},
fr: {
...frGeneral,
...frHeader,
...frNavigation,
...frHome,
...frChat,
...frRegister,
...frPasswordReset,
...frError,
...frActivate,
...frSettings,
...frAdmin,
...frSocialNetwork,
...frFriends,
...frFalukant,
...frBlog,
...frMinigames,
...frMessage,
...frPersonal,
...frSeo,
},
};
const i18n = createI18n({
locale: store.state.language,
fallbackLocale: {
ceb: ['en', 'de'],
default: ['de']
fr: ['de'],
default: ['de'],
},
messages
});