From: "Bill Moseley" <[email protected]>

On Mon, Dec 21, 2009 at 8:14 AM, Clinton Gormley 
<[email protected]>wrote:

>
> Ah ok.  Yeah, xgettext.pl just extracts from text in l() or loc(), not
> quoted strings in general.
>

A nice feature would be to pass in a list of names to match in case you use
something other than l() or loc().

I have not thought about this much, but would a better approach to just
extract out all quoted text?

Maybe it is not helpful in this case, but I have seen another idea of 
getting all the strings that should be localized...

I use Catalyst::Plugin::I18N::DBI for localizing, and it uses a DB table 
that stores the translations, not .mo or .po files.

When a string that should be localized was not loaded in the memory from the 
database but it should be translated, the module can be configured to insert 
that key in the translation table automaticly.

In order to load all the strings that should be translated, it could be made 
a script that just accesses all the pages of the website (if the program is 
a web site). That will require to display all the strings, and if it won't 
find some of them, it would add them in the lexicon table automaticly and 
they just need to be translated.

Maybe this technique could be adapted for generating .po/mo files also...

HTH.

Octavian





_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to