Hi all I've just released version 0.77 of Locale::Makextext::Lexicon with its accompanying Locale::Maketext::Extract and xgettext.pl, which finally supports HTML::FormFu config files.
http://search.cpan.org/~drtech/Locale-Maketext-Lexicon-0.77 For those already familiar with Locale::Maketext::Lexicon: ---------------------------------------------------------- Officially, FormFu has been supported for a long time, but the parser was broken from the start. The new parser uses YAML.pm, and should work just fine, recognising any keys that match /_loc$/ and have a scalar value. Those of you who already use xgettext.pl, please download this version, try it out, and report any bugs to: http://rt.cpan.org/Dist/Display.html?Queue=Locale-Maketext-Lexicon For those of you who don't use Locale::Maketext::Lexicon: --------------------------------------------------------- If you're planning on translating your website or application, you should really consider it. L::M::Lexicon subclasses Locale::Maketext to give you a powerful i18n module, with an easy interface for your translators. As you write your code, you 'mark' strings that need to be translated, for instance: Instead of: print 'Hello world'; You write : print _('Hello world'); Or in your FormFu config files: Instead of: content: Hello world You write : content_loc: Hello world You can also pass parameters to strings, eg: print _('I found [quant,_1,file,files,no files at all]',$files_found) You can use these strings in your Perl code, your Template Toolkit, Text::Template, Mason, YAML or FormFu files. At any time, you can use xgettext.pl to read through all of your code/templates/config and to extract these strings into a gettext PO file, which your translators can edit easily using (eg) Poedit. I write this not as the genius who came up with these modules, but as somebody who has just gone through a painful migration from a not-so-clever i18n strategy to using Locale::Maketext*. I became a maintainer of Locale::Maketext::Lexicon because I liked what it did, and wanted to make it better :) If you'd like to read more, start with these links: - To understand the issues around i18n: http://search.cpan.org/~ferreira/Locale-Maketext-1.13/lib/Locale/Maketext/TPJ13.pod - The Locale::Maketext approach to solving these issues: http://search.cpan.org/~ferreira/Locale-Maketext-1.13/lib/Locale/Maketext.pod - The Locale::Maketext::Lexicon interface to Locale::Maketext to make it all a bit more maintainable than storing all of your strings in a Perl module: http://search.cpan.org/~drtech/Locale-Maketext-Lexicon-0.77/lib/Locale/Maketext/Lexicon.pm - The xgettext.pl script for extracting all translatable strings into a .po file: http://search.cpan.org/~drtech/Locale-Maketext-Lexicon-0.77/lib/Locale/Maketext/Lexicon.pm - The Poedit cross-platform application which your translators can use to edit your .po file: http://www.poedit.net/ If you find any bugs, have any suggestions or patches, or need help with this, please feel free to drop me a line on [email protected], or open a bug in: http://rt.cpan.org/Dist/Display.html?Queue=Locale-Maketext-Lexicon thanks for reading this far :) Clint _______________________________________________ HTML-FormFu mailing list [email protected] http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
