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

Localisation feature #57

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

muellerphilipp
Copy link

With this PR, whocanuse can be localized/translated (#14). It is structured as follows:

  • To enable localized routing, I added a next.config.mjs file and configured it to support English and German. Please add other translations here so that the router can automatically handle them.
  • The actual translation happens in src/helpers/i18n.js:
    ** Running text is localized using the getTranslatedText function.
    ** Labels and smaller text are localized using translation keys and via getKeyedTranslations.
    ** When adding other languages, they have to be added to the keyedTranslations and textTranslations map in src/helpers/i18n.js. I provided the German translation for an example.

Finally, please excuse the large number of changes. Some of them are because I had to add the translations keys; many others came from formatting with prettier.

@vercel
Copy link

vercel bot commented Dec 12, 2022

Someone is attempting to deploy a commit to a Personal Account owned by @CoreyGinnivan on Vercel.

@CoreyGinnivan first needs to authorize it.

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.

1 participant