-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add In18 for translation to the project #80
Conversation
Visit the preview URL for this PR (updated for commit 15eeccc): https://tcl-71-smart-shopping-list--pr80-ce-addi18n-isfyg822.web.app (expires Wed, 22 May 2024 08:24:28 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 1e7ade9d0f374c4ddb5d7ab6fc541062fc7a1ab4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Celine! This is a really cool feature!
Do you think we can add a language selector in the nav bar?
I haven't used this i18n library myself but noticed that the lang attribute in the HTML document is not updated when the language is changed… should we address this?
Would love to hear what you think... also, it would be nice if you could add some reference in the PR description to the i18n docs! Thanks!!
Thank you for the review Viviana! I have updated the code so the html element does change the lang to the current language. Adding the possibility to select the language is a good idea. When we will add it, we will have to modify my last commit and replace it according to the documentation: https://www.i18next.com/overview/api#changelanguage |
Description
Add the i18n library to the project and added two languages English and French.
https://www.i18next.com/
Type of Changes
Enhancement! 🥳
Updates
After
Testing Steps / QA Criteria
After pulling the branch, you can change the language in your local storage (only en or fr)