Monthly Archive for September, 2008

Learned it today: ISO 8601 date format

I thought there were lots of different ISO date formats, which there are, but the ISO 8601 standard replaces them all.

The format declares that dates should be formatted largest unit, to smallest unit.

Example date: 2008-09-28

See also:
ISO 8601 on Wikipedia
W3C Quality web tips: Date and time format
W3C Datetime notes

L10n: localisation of WordPress

Application localisation has caught my interest recently, for many years it was satisfactory to create applications that only understood (or expected) simplified character sets. Even though there were often cases where such an application would fail, where words or names are borrowed from other languages.

The question for me now is “How can I publish in multiple languages?” I have chosen WordPress as my content management engine. Can it succeed internationally?

When you start searching for multi-lingual or bilingual wordpress, you are likely to end up on the WordPress codex pages. You may also be wondering what it means. These pages will show you how to get WordPress specifically in your languages, i.e. German WordPress, French WordPress. They also tell you how you can help and they link to places to go.

The WordPress pages: Translating WordPress and WordPress in Your Language. If your language is not listed in WordPress in Your Language, you can also try the WordPress Language File Repository. I found the WordPress Language File Repository to be the easiest location for retrieving *.po and *.mo files.

*.mo files can be used by WordPress to render your blog in the correct language if a visitor arrives that is not as familiar to your language. They don’t really help you display your blog in a different language, unless you have lots of registered users that use the admin facilities of your blog.

You can create your own *.mo files for plugins and templates, these will be more useful to attract foreign visitors. A useful tool for managing your localisation capabilities is the Codestyling Localization, wordpress plugin.

It is very good at visualising localisation and you can turn it on and off as you please. The process of using the plugin to create *.po files is to painful, unless you have a very small plugin or template.

So how would you create translation *.po files? Go to the WordPress Language File Repository and download the *.po and *.mo files for your version of WordPress and your desired language locales.

I also wanted something for the actual content.
Polyglot2
can be used to work out the users preferential locale and if that is available, display content in that locale. Unfortunately this plugin will only pick up the user locale if it matches a set of prepared locales. The plugin only uses two letter locales, so there are some limitations. You are also forced to write the translations directly into the same post, limiting the number of translations and the size of the possible articles.

A better WordPress plugin for multilingual blogging called Gengo. This tool allows you to manage multiple languages, creating relationships of translation groups. This allows you to produce multiple streams of content from the same blog in multiple languages. If you want to assign translations it is simply a matter of selecting the post that you have a new translation for.

I have created content in the following languages to demonstrate:

  • English
  • French
  • German
  • Hindi
  • Chinese
  • Japanese
  • Arabic

I’m really impressed with the design of this bilingual spanish/english magazine http://www.kprensa.com/. I don’t know what plugins they have used. But they have done a good looking job.

Update (2008-12-17): I’ve dropped multilingual support on this blog. I can’t communicate in multiple languages anyway. It was purely a very time consuming experiment, which I will continue to be interested in.

Pretty useful documentation

I’d love to see some! I was reading an ex-colleagues blog (Big Geek Consulting) which presents some tools for building useful documentation.

Big Geek’s list is a collection of tools included in a Slashdot discussion:

  • FOP is an Apache XML XSL-FO renderer, written in Java. So it doesn’t really address the documentation issue, Apache FOP only provides a rendering solution.
  • Xetex is a latex descendant. TeX solutions do not solve technical documentation issues, but I believe text based solutions like LaTeX do provide better version tracking opportunities that a binary formatted document.
  • Lout Vaguely wiki like (but pre-dating) style of document writing, but with support for all the bits you need to create a document, not just text. Uses Knuth algorithms for line spacing. Lout is a document formatting system designed and implemented by Jeffrey Kingston at the Basser Department of Computer Science, University of Sydney, Australia.
  • Prince An HTML based commercial solution for making real documents. It supports new and fancy CSS properties that let you make real documents. Mergable, diffable, standards based, but not free.

I think DocBook should also be added to the list; DocBook is an Oasis supported XML standard for xml technical documentation, used by CERN, FreeBSD, Linux, Gnome and co. From which you can use XSL-FO (or FOP) to render into whatever pretty format you want.

Purposefully excluded from the list:

  • OpenOffice
  • MS Word

Both of these applications now support XML based document formating. I think this makes both applications acceptable technical documentation options, as long as Open XML standards are used, then real difference comparisons could be made between versions.

My issue with technical and project documentation is that it does not represent a dynamic system well. Typically business users and management will want to use Microsoft word products and turn on change tracking to manage change. The problem I have with this approach is it is almost impossible to understand a document that has change on; it is impossible to compare different versions of that document and the document grows to incredible size to manage it.

A XML or other plain text markup solution offers simplicity in change management, it can be delegated to a content management system with difference tools – like subversion or CVS, where most of the project deliverables are maintained. Where such a solution would fail would be with business users , or anybody who wants to create a document quickly.

For me, this would make OpenOffice or Microsoft word (if users saved files as XML) the best solutions. The user would be able to quickly create XML based documents that are easy to read and anybody who wanted to compare any particular version would be able to do so from the source management system.