This PR adds major languages (German, Italian, Spanish, Portuguese and French) and a button to switch between the languages.
# Related issues
Closes: #69
johannes.vos
added this to the 0.1.0 milestone 2026-05-20 20:36:36 +02:00
jakob.scheid
changed title from Add more Languages and switch button to Feat: major languages and language switching button2026-07-20 12:06:57 +02:00
jakob.scheid
changed title from Feat: major languages and language switching button to Feat(i18n): major languages and language switching button2026-07-20 12:24:56 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR adds major languages (German, Italian, Spanish, Portuguese and French) and a button to switch between the languages.
Related issues
Closes: #69
@@ -0,0 +23,4 @@const isOpen = ref(false);const languages = [Please do not use hard-coded values. All strings should be in the locale files.
@@ -0,0 +36,4 @@() => languages.find(l => l.code === locale.value) ?? languages[0]);async function selectLanguage(code) {I think an extra function that simply calls another function is not necessary.
@@ -0,0 +49,4 @@}function closeOnBlur() {// Kleines Delay damit Click auf Option noch registriert wirdI ask you to speak English.
Should we say „Sie“ or „Du“ in German?
I suggest naming the directory
src/features/i18n//src/features/internationalization/src/features/locale_preferences.@@ -0,0 +40,4 @@await loadLanguage(code);localStorage.setItem('locale', code);document.documentElement.lang = code;document.documentElement.dir = code === 'ar' ? 'rtl' : 'ltr';Consider that Arabic isn't the only language written from right to left.
When you open the dropdown menu, select a language, and then click on it again, it closes immediately.
@@ -0,0 +24,4 @@const isOpen = ref(false);const languages = [{ code: 'en', label: 'English', flag: '🇬🇧' },You do not need lines
const currentLanguage = …if you simply writeThere is no error handling if a locale does not exist.
@@ -21,3 +21,3 @@const SUPPORTED_LANGUAGES = ['en''en', 'de', 'fr', 'es', 'it', 'pt', 'zh', 'ja', 'ar', 'hi'Not all of these languages are supported.
@@ -0,0 +111,4 @@border-radius: 6px;padding: 4px 10px;cursor: pointer;font-size: 0.9rem;Why did you do that?
Add more Languages and switch buttonto Feat: major languages and language switching buttonFeat: major languages and language switching buttonto Feat(i18n): major languages and language switching button