feat: Add UI localization with German (default) and English language support#37
Merged
milljoniaer merged 7 commits intomainfrom Mar 24, 2026
Merged
Conversation
- Add i18next and react-i18next configuration (i18n.ts)
- Create German (de) and English (en) locale JSON files with all UI strings
- Add LanguageContext following ThemeContext pattern for language state management
- Add useLanguage hook following useTheme pattern
- Add LanguageSwitcher component (DE/EN toggle buttons) in sidebar
- Wrap App with LanguageProvider inside ThemeProvider
- Import i18n in main.tsx before App
- Update UserHeader with translations and LanguageSwitcher
- Update MainLayout with translations
- Update NavigationItem to use t('nav.<id>') for tab labels
- Update Footer with translations
- Update all pages: Recommendations, Favourites, SearchHistory, AuthVerify, Impressum, Account, Library, Login
- Update RecommendationForm and ResultsDisplay components
- German (de) is the default language; persisted in localStorage under 'language' key
- Prompts, markdown content, proper names, and 'DELETE' confirmation text remain untranslated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nslation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…e support Co-authored-by: milljoniaer <78978542+milljoniaer@users.noreply.github.com> Agent-Logs-Url: https://github.com/ls1intum/LEARN-Hub/sessions/16f04be8-eb5b-4046-aaf9-4aca218b1785
Copilot
AI
changed the title
[WIP] Add localization to the application with sidebar switch
feat: Add UI localization with German (default) and English language support
Mar 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces i18n to the entire client UI. German is the default language; English is the alternative. Language preference persists in
localStorage. Prompts, markdown content, and PDF resources remain in German.Infrastructure
i18next+react-i18next— inline resources, no suspense, readslocalStorage["language"]on init (defaults to"de")LanguageContext— mirrorsThemeContextpattern;setLanguage()updates both React state andi18n.changeLanguage()useLanguagehook — mirrorsuseThemeLanguageSwitchercomponent — DE/EN toggle buttons, placed inUserHeadernext to the theme toggleTranslations
src/locales/de.jsonandsrc/locales/en.json— 246 keys across navigation, all pages, forms, and layout componentst("nav.<tab.id>")inNavigationItem— no changes to theNAVIGATION_TABSconstant neededComponents updated
All user-visible strings replaced with
t()calls across:MainLayout,UserHeader,Footer,NavigationItem,RecommendationForm,ResultsDisplay,LoginPage,AuthVerifyPage,RecommendationsPage,LibraryPage,FavouritesPage,SearchHistoryPage,AccountDashboardPage,ImpressumPageTests
src/test/setup.tsinitializes i18next with the actual translation resources so existing component tests continue to resolve translated strings rather than raw keys.⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.