Localization difficult is.

TorgoX on 2002-05-01T04:32:31

Dear Log,

In the newly localized Apach3::MP3, I had a bit where it generated the "Apache::MP3 was written <a href='...'>by Lincoln D. Stein</a>" by doing a lookup on a key for "Apache::MP3 was written " and then a lookup for "by Lincoln D. Stein" and then just doing VAL1, a({href=>'...'}, VAL2). Something felt quite wrong about this, but I figured "feh, I'll think of something better later."

The problem arose with Irish (Gaelic). There the translator said it /had/ to come out "Apache::MP3 by Lincoln D. Stein was written." So I'm going thru all the lexicons changing it to three keys, one for text-before-Lincon, one for Lincoln-D-Stein, and one for text-after-Stein.

And I guess I should ask all the current translators "Did you have to force things to fit into the structure 'Apache::MP3 was written' + 'by Lincoln D. Stein'?"


#include

Fletch on 2002-05-01T15:09:45

So what exactly is the ISO language code for Dagobah?

Template

darobin on 2002-05-01T19:28:36

Why not use a templating approach, wouldn't you have less special cases? "${moduleName} par ${author} a été écrit" (or something more elaborate).

Re:Template

jhi on 2002-05-01T21:25:20

Did you read Sean's message? Have you looked at localizing and Locale::Maketext? It's all about templating.... and simple templating as such doesn't work, exactly because the word orders of different languages do not co-operate.
Or because expressions may separate and split, depending: just think of "c'est nest pas"...
Or because of plurals happen to be irregular? Or because of gazillion other reasons.

Re:Template

darobin on 2002-05-02T11:54:27

Yes, I did read Sean's message and I know that local problems are far harder than that. It's just that reading from the text I got the impression that Sean was using an approach a touch more ad hoc than that, which made me curious (in a conversational way, otherwise I'd have gone read the source).

Re:Template

TorgoX on 2002-05-01T22:37:59

Go pre-order the Best of the Perl Journal volume where my article about localization will (re)appear.

Re:Template

darobin on 2002-05-02T11:56:02

I definitely intend to get that book, especially as I subscribed to TPJ and only ever got one issue. I won't preorder though until I manage to get a job because in the meantime I have other priorities ;)

Re:Template

citizenx on 2002-05-02T12:22:56

I love that article. I read it for kicks and laughs in addition to its lovely informational nature. I grabbed that issue of TPJ to read on the crapper the other day and thought of you, Sean.

Hmm... maybe I shouldn't have mentioned that.

Re:Template

TorgoX on 2002-05-02T18:24:39

I'm always glad that my articles "help people work on their qi".

Also, it's the one TPJ article that prominently features the scenario of a developer having a fainting spell.