evcc-io / evcc.io

evcc website
https://evcc.io
MIT License
25 stars 12 forks source link

Support for multiple languages (incl. English) #11

Closed duckfullstop closed 1 year ago

duckfullstop commented 1 year ago

This PR adds support throughout the site for Localisation and Internationalization, and also provides the first translation into English.

A few notes:

This can be shipped in this state if we want to get it out of the door, hence why it's not marked as a draft, but improvements would be appreciated.

andig commented 1 year ago

Whoah.... thank you! As for the picker: I'm no ux guy, but many websites just show EN|DE. We probably won't translate this into 20 languages any time soon.

duckfullstop commented 1 year ago

As for the picker: I'm no ux guy, but many websites just show EN|DE. We probably won't translate this into 20 languages any time soon.

I feel like making it a picker would encourage further translation into other languages later on down the line - would be trivial to just make it a toggle for the time being though.

duckfullstop commented 1 year ago

Don't supposed you've had any chance to take a look at this @naltatis?

naltatis commented 1 year ago

@duckfullstop sorry for letting this wait for so long. I'll review this today with the goal to get the English version live very soon.

naltatis commented 1 year ago

Thanks for your work @duckfullstop. I've made a couple of adjustments to the code and the content.

I've tried to change the configuration in a way that /en and /de would both be served from subdirs with / redirecting to the appropriate language (browser lang). But this (smart redirect) does not seem to be possible with gh-pages. In addition, moving German to /de would break our short urls /sticker and /slack and I didn't find an easy and non-hacky way to preserve this. Thats why I decided to stick with your proposed "German stays in /" configuration for now. This is non invasive and we can always improve this later.

Thanks for your works and again sorry for the delayed response 🙌