Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Multilingual Support #44

Merged
merged 8 commits into from
Dec 24, 2023
Merged

Multilingual Support #44

merged 8 commits into from
Dec 24, 2023

Conversation

drHyperion451
Copy link
Owner

@drHyperion451 drHyperion451 commented Dec 22, 2023

I've made some improvements to support multiple languages. The main js logic is created, but there is still some work to do:

To-Do:

  • JavaScript Logic.
    • Read json and change document
    • Change stuff that is being controlled by js. (The YES text, the latest solution...)
    • Warn the user if the language is not avaliable. Code
  • Language UI switch. Code
  • Support for right to left writing languages (hebrew, arabic...)
  • Support for other writing systems than latin alphabet.

How does it work?:

It will use a query variable on the url. For example:

https://drhyperion451.github.io/?lang=es-ES
Sets the website to Spanish es-ES using a json file lang/es-ES.json. The link doesn't work because it's not deployed.
By default it's in English en-ENand it's not necessary to add the ?lang=en-EN variable to the url.
/lang/en-EN.json it's an example for all the people who want to contribute to the project.

Made an example translation for es-ES using automatic translation. Hope @MrTorfick improves it a bit.

@drHyperion451 drHyperion451 added enhancement New feature or request help wanted Extra attention is needed js Issue reegarding JavaScript html labels Dec 22, 2023
@drHyperion451 drHyperion451 self-assigned this Dec 22, 2023
@drHyperion451 drHyperion451 linked an issue Dec 22, 2023 that may be closed by this pull request
@drHyperion451 drHyperion451 marked this pull request as ready for review December 24, 2023 10:47
@drHyperion451 drHyperion451 merged commit 897c1cb into dev Dec 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed html js Issue reegarding JavaScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to change the language of the website
2 participants