opennic / opennic-web

Official OpenNIC Homepage
https://www.opennic.org/
45 stars 13 forks source link

Multiple Language Support #29

Closed jonaharagon closed 6 years ago

jonaharagon commented 6 years ago

This PR will change nothing visually at the moment, but has a lot of changes that will allow us to build language variants for all the pages hosted, if we can get translators.

All content is now located in _i18n/[lang].

New languages should be added to line 12 in _config.yml, for example:

languages: ["en", "fr"]

en is the default language. Other languages will be available at https://www.opennic.org/[lang]/page (i.e. https://www.opennic.org/fr/irc) as they're added.

To add a new language, copy the _i18n/en folder to _i18n/[lang] and change any relevant files.

Any ISO 2-character language codes are acceptable formats for [lang].

See https://github.com/Anthony-Gaudino/jekyll-multiple-languages-plugin for more details.

jonaharagon commented 6 years ago

Deploy preview for opennic ready!

Built with commit f4adc1e49944ee702e7868fa43e1b077b34c95a9

https://deploy-preview-29--opennic.netlify.com

jonaharagon commented 6 years ago

There isn't a way to toggle between languages on the site at the moment (because only one language is implemented), but I'll add a dropdown or list of flags or something in the footer if we can get a couple volunteers to translate. TBD.

cc @Fusl