hicetnunc2000 / hicetnunc

hicetnunc UI/UX
http://hicetnunc.xyz
800 stars 281 forks source link

Multilingual Support #173

Open Quasimondo opened 3 years ago

Quasimondo commented 3 years ago

With hic et nuc being as sparse as it is language is fortunately not a huge issue, still there is a huge part of the world who's not speaking English fluently. Since currently the amount of strings that need to be translated is still very small I think now would also be a great opportunity to allow for supporting an interface in different languages.

What would it take to make that happen? And who can help with translations?

violetforest commented 3 years ago

What part of the platform do you propose is multilingual?

andrevenancio commented 3 years ago

I'm happy to work out this feature on the website itself. But there are some elements that I dont think we can translate. Those are the blockchain fields (title, description).

What I propose: 1) We have a component where the user selects language (like we have the circle to toggle the theme) 2) We store the language on localStorage (like we're doing with the theme) and we load a translation JSON containing all the key pairs and relative translation (structure proposal below) 3) we force a window.location.reload() after setting the localStorage page reloads, reads from the localStorage and loads the correct translation.json

{
  "menu-mint": "OBJKTs",
  "menu-mint-label": "(mint NFTs)",
  "menu-manage": "manage assets",
  "menu-about": "about"
  ... etc
}

The translations can live on our github page, like we're currently hosting the (o.json, w.json, b.json for blocklist objkt, wallets and ban respectively).

Should I do the first batch in english, and people can expand from that into their native language? @Quasimondo I'm assuming German can be done by you?

violetforest commented 3 years ago

I can do spanish.

Was going to do translation of the FAQ but I'm assuming people would just do google translate? Or is that not a reliable tool?

andrevenancio commented 3 years ago

I can do spanish.

Was going to do translation of the FAQ but I'm assuming people would just do google translate? Or is that not a reliable tool?

I'm actually hard. because the FAQ is constantly evolving. So if something changes in the English version we then need to ask everyone to update their own faqs versions. I'm not sure what's the best approach for that use case.

Quasimondo commented 3 years ago

Thanks everyone for jumping onto this! So yes, we definitely need a solution that can keep pace with the continuous changes that happen on the site. And of course making additions or updates to the translation list should be as easy as possible.

As for the question what should be translated I would just prioritize it by what functions get used most to least. Another question that might be more something for the future is if or how translation proposals should be "vetted" or checked for correctness.

somaticbits commented 3 years ago

I'd be willing to do a french translation if that's something useful.

andrevenancio commented 3 years ago

This feature is dependent on the footer refactor I propose on #182 Can't move forward until we address that

EMES77 commented 3 years ago

I could help with German as well.

andrevenancio commented 3 years ago

Please feel free to copy the english version to your own language and adjust accordingly

https://github.com/hicetnunc2000/hicetnunc/blob/main/languages/en.json

ries9112 commented 3 years ago

Just added the one for Italian here too: https://github.com/hicetnunc2000/hicetnunc/pull/291

samuelebonaffino commented 3 years ago

Hey! I could try to help with the Italian translation if you'd need it.

ries9112 commented 3 years ago

Hey @samuelebonaffino I added the translation for Italian, you can find it here: https://github.com/hicetnunc2000/hicetnunc/blob/main/languages/it.json

Feel free to propose changes if anything seems off, but hopefully I did an ok job on it. I noticed some very small typos I made so I created a new request and I think it all looks good now: https://github.com/hicetnunc2000/hicetnunc/pull/297

samuelebonaffino commented 3 years ago

@ries9112 sure, I'm not doubting your work, I'm just here to help in case it's needed!