Evan Martin (evan) wrote in evan_tech,
Evan Martin

i18n disambiguation

We finally ran into a translation problem (see point 4) that I've been anticipating: words that are the same in English but different in other languages. We use "None" for "no music" or "no viewers of this poll question", while Russian needs two different words.

I knew somebody has dealt with this before, and I eventually found it in the gettext manual. The (obvious) solution is to disambiguate the strings in your source code: change "None" to "music|None" and "viewers|None". The non-obvious part is what format to use.

Unfortunately, it appears nobody has standardized on a way to do this. I see some projects that include the disambiguation bit after the text, and even Freeciv has their own standard (see their "Q_" macro). But as the gettext manual says, it's nice to put the disambiguation text before (as Freeciv does, too) because you can do a C string trick for the untranslated case.

  • livejournal kids

    Neat image from Jack Dorsey. Every so often someone will ask me about Twitter and I'll dig up a a random day from Brad's LJ in 1999 and talk about…

  • megaupload captcha

    Someone make a Javascript-based captcha cracker for megaupload. It's strange to see those captchas again because I idly myself wrote a…

  • zombie ghosd

    I was tickled to discover another IBM developerworks article on one of my abandoned hacks and that both it and its predecessor have been translated…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.