This blog currently uses the sixteen WordPress theme. Friday I turned on a multi-language plugin (xili) and theoretically, everything should have worked out of the box:
Sixteen has been already translated into French, Spanish, Russian, Japanese, Arabic and supports translation into more languages.
In practice French did not work out of the box: the french locale files were corrupt, not to mention badly translated, and the plugin uses the timeago JQuery module without setting up localization, you always get English relative time. So here are the steps to fix the Sixteen theme (version 1.3.0.4) for French. Modulo the localization files, this should hopefully work for other languages:
- Backup everything
- Replace the content of the french localization file
sixteen/languages/fr_FR.po
with this one. - Use a tool like poedit to generate a new version of
sixteen/languages/fr_FR.mo
. If the file is zero byte long, there is a problem. - Replace the file
sixteen/js/jquery.timeago.js
with the latest version (1.4.1). - Download the locale specific timeago configuration for the language you need, in my case it was
jquery.timeago.fr.js
, put these files into thesixteen/js/
directory. - Replace the content of file
sixteen/functions.php
with this updated version
If you don’t care about French, you skip steps two and three, but note that the compiled localization files for Spanish are empty, and missing for Arabic, Japanese and Russian, so I doubt these will work straightaway.
One thought on “Properly Localising the Sixteen theme”