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

Adding translations #445

Open
fparedlo opened this issue Dec 7, 2023 · 3 comments
Open

Adding translations #445

fparedlo opened this issue Dec 7, 2023 · 3 comments

Comments

@fparedlo
Copy link

fparedlo commented Dec 7, 2023

What is the best way to do this ?
Would it be better to send the URL to the translation via Issue or Pull request?

Should we consider opening a folder in this repository to host all translations in one repo instead of linking into others? This will also allow pull request that overwrite the original text

@cksharma2468
Copy link

Hi, I think it would be better if all the translations are hosted in a separate folder as it would be easy to access for new comers.

@ppYoung
Copy link

ppYoung commented Dec 22, 2023 via email

@kavyamehra20
Copy link

Handling translations in a JavaScript codebase involves leveraging internationalization (i18n) libraries like i18next, react-i18next, or vue-i18n. The project structure typically includes a designated directory for locales, housing translation files such as en.json, fr.json, etc. Initialization of the i18n library involves setting up the default language and loading translations into the project. Components then implement translation using i18n functions, with popular frameworks like React utilizing hooks such as useTranslation. Dynamic language switching can be facilitated through a language switcher component. Regularly update translations by extracting new translatable strings from the codebase and using provided tools or scripts. Additionally, consider factors like pluralization and variables in translations, recognizing that different languages may have distinct rules for these elements.

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

No branches or pull requests

4 participants