#522 Add localization using React Context #561
No reviewers
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked-waiting-for-further-changes
bug
bug-only-on-server-for-mobile-not-webpage
Bug-Report-After-Merge
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
further-changes-needed
future-problem-not-fixint-this-period
help wanted
invalid
last-week-issue-to-fix
library
low-priority
needs input
needs review
not-implemented.
project documentation
question
research
reviewed
Script
security
SQL
style
Team 1
Team 2
team leaders
test-creation
testing
topLevel
unassigned
Under-review
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K!561
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "#522-implement-reacts-localization"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Added language context (useLanguage.js), example language files (en.json/sv.json), and language selector component in settings.
I tried to follow the same style as the useStyle.js. Components can use const { translate } = useLanguage() to display translated text. Language selection is saved in localStorage and is saved between sessions. Translation files are in frontend/src/locales/ just included as an example so you can see how it works.


Looks good overall.
The LanguageProvider is set up nicely and follows the same pattern as useStyle. Language selection and localStorage work as expected.
In my opinion, this is a solid foundation. Applying translate() across the UI could be handled in a separate PR to keep this one focused.
Clean and well-structured work, ready to merge.
Looks alright on a glance
I do not know if it's my fault or a code fault, but I can't get the dropdown shown
Which branch are you on?
It was a random cache on my end that was ghosting and messing it up
Have looked it over and it compiles. Get merged
Everything works well on my side.
Hi @c24carso is this issue finnished? when i try to use the fuction on the newest branch i cant use it. If we need to create a new issue for this just say so, or if we use the existing issue