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

implemented i18n #89

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

implemented i18n #89

wants to merge 1 commit into from

Conversation

kruemelro
Copy link

I've implemented i18n translation framework and also added English and German as language. I'm no developer, so please have a look over it

@KMKoushik
Copy link
Member

@kruemelro this is so awesome, great work!

i don't have much time this week, i'll review and merge it next week for sure. Thanks again!

@@ -17,6 +17,7 @@ echo "Git SHA: $GIT_SHA"

docker build -f "$SCRIPT_DIR/Dockerfile" \
--progress=plain \
-t "registry.pthome.de/splitpro:latest" \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good finding :-) I pushed it to my local registry for testing and missed to exclude the changed build script in the PR

import { initReactI18next } from 'react-i18next';

export const supportedLngs = {
en: "English",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you also need to add de ?

@Striffly
Copy link
Contributor

Really cool feature ! It would be great if the translations were also available on the homepage.

If I have some time, I'll add a language selector to the menu.

@vovagorodok
Copy link

I'll add Polish/Russian/Ukrainian translations after merge

@KMKoushik KMKoushik added this to the 2.0 milestone Oct 16, 2024
@KMKoushik
Copy link
Member

this is will be added to 2.0. i'll keep this PR open

@alexanderwassbjer
Copy link
Contributor

Really cool feature ! It would be great if the translations were also available on the homepage.

If I have some time, I'll add a language selector to the menu.

I have implemented the language selector in my branch that is based on this PR.

https://github.com/alexanderwassbjer/split-pro/tree/feature/i18n-support

@alexanderwassbjer
Copy link
Contributor

Good PR! Some missing strings otherwise good!

@KMKoushik I can continue on this PR and add all the missing strings, fix language switcher, date-fns locale support etc. Do you want me to continue and make a PR? 😊

@klodeckl
Copy link

Any news here? Switching language would be great!

@Rosso2004
Copy link

Hi guys! 👋

I implemented translations using i18n, following the approach already present in the project, but I made some significant improvements to make the code more organized, maintainable, and accessible even to those unfamiliar with programming.

What I did:
Clear separation of translation files:

I separated translations into distinct files for each language (e.g., groups_details.json, groups_page.json, etc.). This makes it easier to add new languages or modify existing translations without digging through the code.

Dynamic language support:
It’s now possible to pass the desired language as a parameter (e.g., it or en), and the system will automatically load the correct translations. Additionally, duplicating an existing language folder will automatically add a menu item to switch to the newly created language, all without touching the code.

Why these changes are useful:
Maintainability: Adding new languages or modifying translations is now much simpler.

Clarity: Translations are organized intuitively, making it easier for non-developers to work with them.

Flexibility: Dynamic language support makes the system ready for future expansions.

Link to the Pull Request:
🔗 Click here to view the Pull Request #208

Screenshot:
image
image

Feel free to review and let me know if there are any suggestions or changes to make! 😊

Thanks,
Rosso Simone

@kruemelro
@KMKoushik
@Striffly
@vovagorodok
@alexanderwassbjer

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.

7 participants