Hi all, I'm trying to figure out the least insane way to have multi language support on a project I'm doing. Based on my interpretation of Locale-Maketext-Lexicon-0.52 docs should I skip multilingual support until the bitter end and at that point use xgettext.pl or similar to extract sentences from my templates. Then create po-files and do the translation when the project is all done.

Has anyone worked like that? Any pros or cons?

Because to be honest it scares me. It feels like it's something which will sneak up on me and poke me in the eye later on. My understanding is that I18N (this is a Catalyst app so Catalyst::Plugin::I18N with TT templates to be specific) will use the full sentences as hash keys, what if I realize that there's a spelling error? Or if I just want to change the wording? My understanding is that I'll have to locate the phrase in each po-file and then replace it there as well. Is that really more sane than using semi-cryptic place holders like "welcome_here" and "plug_for_registering"?

I would really appreciate if someone has experience with the problem and can share some of it with me as I'm currently leaning towards putting all text as place holders and having [% c->l('welcome_1') %] etc from start (and the above link suggests it'd be the wrong way to go under "Localization Tips" but I can't get into my head why that would be the case).

Thanks in advance

In reply to i18n best practice by jmo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.