i18n Re-Visited

Done a good weekend’s job: added a button to my site’s menu bar1. A single button but a lot of tweaking under the hood.

Every list-page of the site (that is, the main page, posts list, list of posts for a given tag, etc.) is now available in four versions:

  1. in Russian, but including pages in English that have no Russian versions;
  2. in Russian with pages only in Russian;
  3. in English, but including pages in Russian that have no English versions;
  4. in English with pages only in English.

The button (the one with a hieroglyph) is a switch between modes 3 and 4 (or 1 and 2 if you’re reading the Russian version). It only appears where applicable, as well as the language switch.

Had to add Russian translations to several old posts to avoid breaking links.

Oh, and RSS feeds are available in all four variants, too. So if you’re tired of cyrillic letters in your feed reader, there you go. This was actually the reason for all the revamping.

I like Hugo more and more every day. It does require quite some figuring out, admittedly, but once you have, anything is doable.


Update:

Almost four years later, the “only in the selected language” variants were removed. Looks like they were not really used anyway, and I like the site less convoluted.


  1. The button used to be in the sidebar before the move to LoveIt, now it is in the top right corner on wide screens and near the end of the fall-down menu on the narrow ones. ↩︎