-
Notifications
You must be signed in to change notification settings - Fork 30
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
I18n: Add translation support #91
base: master
Are you sure you want to change the base?
Conversation
I have changed the behavior of the index page to redirect to the browser preferredLocale instead of the default locale (en). If their language does not exist as a translation, it will redirect to the default locale (en). |
How will this look on mobile/ is that dependent on something like #65? |
Hey @Kingproone , I have looked at the translated page using the dev tools in Firefox. I chose an iPhone 13 as the screen size and compared it to the English page on my real iPhone 13, it looks basically the same (except for the text being a bit more at some places, nothing overlapping though). This should be expected since the only thing that is being changed are strings, not layout. I would also think about this being fine with the changes from #65 , the only adjustments that would need to be made is to use the useTranslations function instead of hardcoded strings in the hamburger menu, and adjust the links (Which both you can see in my changes as an example and should be pretty simple). :) |
This pull request is meant to address issue #58 .
Hey there! I'm new here and find the project really cool, so I thought about trying to contribute! :)
I added support for translating the index page and the payment details page. I used the Documentation from Astro and also added a dynamic route for the languages, so that we do not have to duplicate a lot of files for the different languages. If something is not written in another language, the fallback language (default language) is English. Since I can speak german fluently, I translated the pages to german. The links are also dynamic based on the language.
Feel free to run the dev environment and take a look at it! You can switch the language using the dropdown in the navbar:
Example of the Hero section in german:
I would be happy if someone would take a look at it and I'm also open to discuss the changes! :D