Common code for multilingual Jekyll sites
Guide that inspired this Thanks goes to @sylvaindurand.
_includes
;_layouts/redirect.html
, _includes/t.html
, _includes/langbox.html
;{% include jekyll-trans/<filename>.html %}
(replace <filename>
ofc). This is to dance around GitHub pages' symlink limitations;index.html
referencing your normal layout. In root index.html
reference a redirect
layout;{% include t.html s='translation_string_id' %}
lang = {{ page.lang }}
in your <html>
taglang
variables over paths, i.e.:
```YAML
defaults:t:
en:
lang: 'English'
key: 'value'
key2: 'value2'
lang
is assumed to be the language's name in itself, for the purposes of the language selection UI.langbox_js.html
from somewhere relevant, e.g. {% include jekyll-trans/langbox_js.html %}
from your scripts.html
include.t.lang.cookie_banner
.TODO: