Documentation Kenii Catalog How-to guides

Run the catalog in another language

Applies to 2.10.0 and later

Translate the admin and public catalog interface into another language

Run the catalog in another language

Kenii ships with English only, but every screen in the admin, and the labels and
buttons on the public-facing catalog pages, read through WordPress’s standard
translation system. You can run the whole interface in another language by
supplying translation files and setting a locale.

This covers the interface text (labels, buttons, messages, headings like “Download
the Catalog (PDF)”). It does not translate your actual catalog content: program
names, course descriptions, policy text, and anything else you typed in stays in
whatever language you entered it. Enter your content in the language you want your
site to display it in.

  1. Get a translation of the plugin’s two template files. Both live in the plugin’s
    languages/ folder: kenii-catalog.pot covers PHP strings (the public
    shortcodes and server-rendered text) and kenii-catalog-admin.pot covers the
    admin screens. Hand these .pot files to a translator, or open them yourself in
    a standard WordPress translation editor such as Poedit or Loco Translate.
  2. Compile the PHP translation to a .mo file named kenii-catalog-{locale}.mo
    (for example kenii-catalog-es_ES.mo for Spanish, Spain) and place it
    in the plugin’s languages/ folder
    (wp-content/plugins/kenii-catalog/languages/).
  3. Compile the admin translation to a JSON file named exactly
    kenii-catalog-{locale}.json (no extra characters in the filename) and place it
    in the same languages/ folder. If your translation tool’s JavaScript export
    step (for example WP-CLI’s wp i18n make-json) appends a hash to the filename,
    rename the output file to the plain kenii-catalog-{locale}.json name before
    placing it.
  4. Set the locale. For the whole site, go to Settings → General → Site Language
    in WordPress and choose the language. To give one person their own language
    without changing the site default, edit that person’s profile
    (Users → your profile → Language) instead.
  5. Reload the Kenii admin. It picks up the new language immediately, with no
    rebuild or plugin update needed.

If only some strings have been translated, the untranslated ones simply display in
English; nothing breaks. If you need a language nobody has translated yet, start
from the .pot templates in step 1.