Added a multi-language support and architecture - #16
Open
Elgoogko wants to merge 2 commits into
Open
Conversation
…nglish and french) add .idea folder to .gitignore
…ictionnaries: if a key is missing, then the translation will return by default the english translation. It is supposed that the english dictionnary en.ts will always be updated and maintained compared to the others
Elgoogko
marked this pull request as ready for review
August 15, 2026 16:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add language support and translations for multiple languages (English and French)
Add .idea folder to .gitignore
Using a React hook, the application is now able to change its language for the better comfort of non-English users. It provides an architecture that makes it easy to add a new language.
#Add a new language
To add a new language to the application, you need to :
#Use Translations
If you create a new component in the app, you need to use translations in the same way you use Theme colors: by using the Language provider.
In your component (can only be used if it's within the language provider), you can call the translations like this:
And you add keys to the Translations Interface :
Finally, in the English dictionary (or any dictionary you want), you can add :
Note
While developing your component, use the hard-coded text in your component. The translation comes at the last step. Moreover, the English dictionary is the default fallback if a language dictionary is not complete or is missing keys to prevent blank / empty texts.