On Fri, Feb 06, 2009 at 03:43:24PM +0000, Alex Francis wrote: > Quick survey - what do you use, if anything, for internationalisation > of apps written in Perl?
We use a home-grown hack, despite only ever having written code that talks to its users in English. We use Template Toolkit for all our output, and make use of it being configurable what the [% magic %] characters are. So all our templates go through two stages. The [* first stage *] is when we install an app. That takes an input file like templates/RAW/blah.tt2 and substitutes things like [* patient *] with 'patient' and writes templates/en/blah.tt2, using a phrase file to figure out what to substitute with what. By our just writing a new phrase file, it would also Do The Right Thing and spit out, eg, templates/fr/blah.tt2. Those files still have [% TT markup %] in them so that we can substitute, eg, a number in the right place on the fly. This is a poor solution, somewhat mitigated by playing tricks with the TT path so that we can override the auto-generated translations. > Have you ever come across problems like ... > (where different values of numeric substitution values require > different plural forms in the resulting sentences) Certainly - eg in Arabic you have different forms for singular, dual (two of something) and plural (more than two of something). IMO, internationalising interface elements (eg the name of the File menu, the name of the Open option in it) is fine, internationalising *text* is best done by a human translator, because even languages as closely related as English and German can't just be translated by translating a clause at a time and sticking 'em together, and god forbid that you try doing that with English and Arabic! If you do, you'll look incompetent and illiterate. And never mind that for some languages you'll need different page layouts. The obvious examples being that right-to-left and left-to-right languages need *some* things mirrored. A less obvious example is that icons only make sense in a cultural context. Back in the early nineties when the interwebs were just getting started, lots of people used Pegasus Mail. Some people in this country found the interface confusing, because it used an icon on a US-style mailbox on top of a post for a GUI button. That has no meaning here, and so some people didn't think to click it to get their mail. And going the other way, a UK-written mail app used a picture of a red pillar box, thus confusing USian users. -- David Cantrell | Minister for Arbitrary Justice Just because it is possible to do this sort of thing in the English language doesn't mean it should be done _______________________________________________ BristolBathPM mailing list [email protected] http://mailman.bristolbath.org/mailman/listinfo/bristolbathpm
