blros / urarina-wax

https://blros.github.io/urarina-wax/
Other
0 stars 0 forks source link

multilingual interface #5

Open blros opened 11 months ago

blros commented 9 months ago

For multilingual capabilities, please have a look at polyglot: https://github.com/untra/polyglot

and it's implementation in CariDiScho: https://thecaribbeandigital.org//caridischo/es/collections/ github repo here: https://github.com/elotroalex/caridischo

It should give us the functionality we want. For the navigation, header, footer, etc it basically uses liquid to point to language files in the the _data/ directory.

It also handles the drop down metadata etc in multiple language in the faceted browse

emkow2020 commented 7 months ago

For simplicity, added a _include liquid function that will link to multiple language versions of pages. Add {% include langcode_url.html %} to the markdown files after the frontmatter. This will determine the page name, and append _es or _ur for Spanish or Urarina. Maintain a _es and _ur version of each page. English is the default and has no _XX in the file name. Eg: welcome.html welcome_es.html welcome_ur.html

The "index" page is more difficult, so it's hardcoded with a {% include langcode_index.html %}

The more elaborate multi-language tools all had some drawback that made it hard to implement. We still need to think about a more deployable version. That may be creating/modifying a custom Gem.