Skip to content
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

Merged
merged 6 commits into from
Jun 5, 2024
Merged

Add In18 for translation to the project #80

merged 6 commits into from
Jun 5, 2024

Conversation

ocsiddisco
Copy link
Collaborator

@ocsiddisco ocsiddisco commented May 3, 2024

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

Screenshot 2024-05-03 111703

Testing Steps / QA Criteria

After pulling the branch, you can change the language in your local storage (only en or fr)

image

@ocsiddisco ocsiddisco self-assigned this May 3, 2024
@ocsiddisco ocsiddisco requested review from borjaMarti, vivitt and BikeMouse and removed request for borjaMarti May 3, 2024 10:37
Copy link

github-actions bot commented May 3, 2024

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

@ocsiddisco ocsiddisco marked this pull request as ready for review May 3, 2024 14:23
src/api/useAuth.jsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@vivitt vivitt left a 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!!

@ocsiddisco
Copy link
Collaborator Author

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.
Screenshot 2024-05-13 210242

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

@ocsiddisco ocsiddisco merged commit a6227fd into main Jun 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants