Plugin Directory

Basic Bilingual

Author: Stephanie Booth

You might want to check my work on multilingualism online to understand what brought me to develop this plugin.

Basically, what it does is add two extra fields to the post editing form:

  • Language
  • Other Language Excerpt

Where "Language" is a field for the two-letter code of the language the post was written in, and "Other Language Excerpt" is a textarea for a summary (or translation) of the post in a second language.

Both values are stored as postmeta.

The "Other Language Excerpt" is automatically inserted right before the post content, in a div with class "other-excerpt" and the correct language attribute.

Two template tags are provided:

  • bb_the_time(), which outputs a localized version of the date and time
  • bb_the_language(), which outputs the two-letter language code (for adding lang="xx" attributes to relevant HTML elements)