Skip to content

feat: Implémenter le support multi-langue (FR/EN) réactif avec i18n - #105

Merged
bahmez merged 2 commits into
devfrom
feature/add-supports-multi-languages
Jan 22, 2026
Merged

bahmez merged 2 commits into
devfrom
feature/add-supports-multi-languages

Conversation

@schekina2

Copy link
Copy Markdown
Collaborator

Résumé

Implémentation du support multi-langue (FR/EN) avec changement de langue en temps réel sans rechargement de page.

Fonctionnalités

  • ✅ Système i18n complet avec hooks useLanguage() et useTranslation()

  • ✅ React Context pour gestion d'état global de la langue

  • ✅ Sélecteur de langue (Français/English) dans navbar et page d'auth

  • ✅ 200+ clés de traduction organisées par domaine

  • ✅ Changement de langue réactif (sans rechargement)

  • ✅ Persistance en localStorage

  • ✅ Traduction complète de tous les composants

Fichiers Modifiés

  • src/lib/i18n-context.tsx (NEW) - Context provider

  • src/lib/i18n.ts - Refactorisé pour utiliser Context

  • src/app/layout-client.tsx - Ajout du LanguageProvider

  • src/components/language-switcher.tsx - Intégration complète

  • public/locales/fr/common.json - 400+ traductions FR

  • public/locales/en/common.json - 400+ traductions EN

  • 12+ fichiers de composants - Intégration des traductions

Domaines Traduits

  • Landing page & authentification

  • Dashboard & workspaces

  • Gestion des membres

  • Opérations boards/tickets

  • Paramètres & notifications

  • Barre de navigation & profil

  • Messages toast & UI

Bénéfices

  • Pas de rechargement pour changer de langue

  • Architecture scalable pour ajouter d'autres langues

  • Traductions centralisées et maintenables

  • Accessibilité: attribut lang mis à jour dynamiquement

Validation

  • ✅ Build production réussi

  • ✅ TypeScript: Tous types validés

  • ✅ Changement de langue: Réactif et instantané

  • ✅ Persistance: localStorage fonctionnel

- Added i18next for multi-language support, enabling French and English localization.
- Created language switcher component for dynamic language selection.
- Updated various components and pages to utilize translations for improved user experience.
- Introduced locale files for English and French with common phrases and UI text.
- Enhanced layout components to accommodate language changes seamlessly.
…ns and context management

- Expanded language support by integrating a new i18n context for managing language state and translations.
- Added comprehensive translations for various components and pages in both English and French.
- Updated existing components to utilize the new translation hooks, improving user experience across the application.
- Introduced a detailed documentation file outlining the i18n setup and usage for future reference.

@bahmez bahmez left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est bon pour moi

@bahmez
bahmez merged commit d9c4e02 into dev Jan 22, 2026
1 check passed
@bahmez
bahmez deleted the feature/add-supports-multi-languages branch January 22, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants