by mootothemax · 15y ago · 0 comments
For an example of possible pain, you can't simply pass a string such as Welcome, Thomas, you have {number_of_messages} messages to your translator and expect all to be OK. I speak a bit of Polish, and in this instance, the word messages will take one of three forms, depending on whether it's 1 message, the number of messages ends in 2, 3 or 4 (but isn't 12, 13 or 14), and another form for everything else.
The gettext library is works really well for handling pain points like these, and the "About" section in its manual gives some common examples like the above: http://www.gnu.org/software/gettext/manual/gettext.html#gett...
Another good format for i18n is the TS format used by QT (http://doc.qt.nokia.com/stable/linguist-ts-file-format.html).