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

Supporting multiple languages/dictionaries #14

Open
ChrisB9 opened this issue Jan 14, 2022 · 4 comments
Open

Supporting multiple languages/dictionaries #14

ChrisB9 opened this issue Jan 14, 2022 · 4 comments

Comments

@ChrisB9
Copy link

ChrisB9 commented Jan 14, 2022

Thank you for this great application.
While diving into the source code I realized it would be pretty nice to support not only english words but a variety of other languages.

For example, instead of having the file called dictionary.txt, it could be called dictionary..txt (same with words.txt), and then through a language selection menu it would be possible to switch languages.

I did do some research for my own language's word list and found this: https://github.com/enz/german-wordlist or https://gist.github.com/MarvinJWendt/2f4f4154b8ae218600eb091a5706b5f4. I could create two lists out of it, a dictionary with only 5 letter words and then a word list with roughly the same amount of words provided in the english set.

We then could to the exact same thing with french, spanish, or any other language that can be provided through a PR.
(ex. https://github.com/words/an-array-of-spanish-words, https://github.com/words/an-array-of-french-words)

@avojak
Copy link
Owner

avojak commented Jan 19, 2022

I thought about this for a little bit initially during development and my biggest concern was handling the UI-keyboard layout. I don't have any experience with non US English keyboards so I'd have to figure that out.

Thanks for pointing out those word lists, that's a good resource!

@ChrisB9
Copy link
Author

ChrisB9 commented Jan 22, 2022

That is a good point, I didn't even think about the keyboard layout.

The way I could imagine that, would be, to have a third file for that language, that contains the layout (and in the future maybe even translations), eg german could look like this:

{
    "row1": {"q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "ü"},
    ...
}

@avojak
Copy link
Owner

avojak commented Feb 7, 2022

Good suggestion, definitely worth looking into further.

I don't know any German, but are there any nuances with the German language that would complicate the game mechanics? I don't have any examples in mind, just a general question.

@ChrisB9
Copy link
Author

ChrisB9 commented Feb 9, 2022

I don't think so, the game mechanics should not get more complicated. As long as utf-8 characters can be displayed, the game should work the same

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

2 participants