wordle icon indicating copy to clipboard operation
wordle copied to clipboard

Feature request: i18n support

Open Askadar opened this issue 2 years ago • 2 comments

Description Hey, picked this project to add slightly custom wordle game to a site, but its user-base is using language other than English, so I'm going to add localization for it. At the same time I could create a PR here so it's straightforward to add support for other languages and make it easier for more people to play. An extra step would be to have separate\custom loader for valid and selectable words in different locales. Otherwise it can be solved with simply replacing words_5 on-premise.

Reasoning As described above, native locale support would make it easier for non-English speaking people to pick up this version of a game as well as play hosted version.

Implementation (optional) Currently I'm looking into which i18n library to use, other than that I plan on adding directory with locales, current en-US (I presume) and the one I'm translating into. For i18n I'm planning to use either i18next since it's a robust library which I have experience with, or svelte-i18n since it seems to be more popular choice for svelte while i18next's svelte lib seems fairly unused.

@MikhaD let me know your thoughts on this, whether you're interested in having i18n at all, preferences for i18n lib\implementation and anything else I might need to know for this feature.

Askadar avatar Jan 15 '23 02:01 Askadar

Just looking over both of those I would recommend you go with i18next

JasonLovesDoggo avatar Jan 15 '23 03:01 JasonLovesDoggo

Thanks both of you. This seems to be the solution I was looking for in #59 . I will look into it.

MikhaD avatar Jan 23 '23 19:01 MikhaD