Feat(i18n): make language a setting #185

Merged
jakob.scheid merged 8 commits from feature/make-language-a-setting into main 2026-08-07 11:44:33 +02:00
Owner

Language setting

This pull request makes the language a setting.

The language switch now stores the current language in the settings. The tests were updated to this new behavior. There is a new watcher in the language switch button component which watches the language setting. The code to set the language is now in src/i18n.js,

To be able to configure settings dynamically, the settings configuration is now a JavaScript module instead of a JSON module.

The user's language is now loaded when mounting the root component as it needs the settings store.

The utility src/utils/currentLanguage.js is now in the I18n feature utilities directory. Its purpose has changed to only parse the navigator language. The tests were updated to this new behavior.

Related issues

Closes #175

# Language setting This pull request makes the language a setting. The language switch now stores the current language in the settings. The tests were updated to this new behavior. There is a new watcher in the language switch button component which watches the language setting. The code to set the language is now in `src/i18n.js`, To be able to configure settings dynamically, the settings configuration is now a JavaScript module instead of a JSON module. The user's language is now loaded when mounting the root component as it needs the settings store. The utility `src/utils/currentLanguage.js` is now in the I18n feature utilities directory. Its purpose has changed to only parse the navigator language. The tests were updated to this new behavior. ## Related issues Closes #175
jakob.scheid added this to the 0.1.0 milestone 2026-08-07 02:16:51 +02:00
jakob.scheid added this to the Project Board project 2026-08-07 02:16:51 +02:00
jakob.scheid added 8 commits 2026-08-07 02:16:52 +02:00
The settings configuration is now a JavaScript module because dynamic
configuration is only possible in this way and dynamic settings
configuration is needed for the language as a setting.
Moved src/utils/currentLanguage.js to
src/features/i18n/utils/navigatorLanguage.js and updated it to only
parse the navigator language.
Set the default language to the fallback language if the navigator
language is not supported.
jakob.scheid moved this to Review in Project Board on 2026-08-07 02:17:49 +02:00
jakob.gregory approved these changes 2026-08-07 11:39:09 +02:00
jakob.scheid merged commit f4f8993e87 into main 2026-08-07 11:44:33 +02:00
jakob.scheid deleted branch feature/make-language-a-setting 2026-08-07 11:44:33 +02:00
jakob.scheid moved this to Done in Project Board on 2026-08-07 11:44:38 +02:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Seekra/frontend#185