[jifty-devel] Jifty now supports Localization (Was Re: jifty l10n and
stuff)
Jesse Vincent
jesse at bestpractical.com
Sat Apr 1 22:22:32 EST 2006
> I just went through the tutorial without too much pain - all well and good,
> though there there is some stuff that's not that clear. I know that jifty is
> still a fairly young creature, so there are bound to be some rough edges,
> but I like the way you have tried to keep it lean and mean as possible. The
> db schema generation looks good.
Cool.
> I wasn't too sure what the admin mode was about - it's basically a crud
> interface on the db?
Exactly.
With regard to internationalization, we've just committed the first pass
at an internationalization framework. I _know_ we've missed things, but
we've sucessfully gotten an app running with a couple words of
translated japanese.
The 30 second tutorial:
Strings that should be localized should be wrapped like this:
my $foo = "This is a test";
should become
my $foo = _("This is a test");
In a mason template,
<h1>My name is <%$foo%></h1>
should become
<h1><%_("My name is [_1]", $foo)%></h1>
To extract and update message catalogs for your app:
# jifty po
To create a message catalog for a new language and fill it
in with blanks:
# jifty po --language ja
Where "ja" is the langauge code for the language you want.
We're eager to hear about bugs and how things are broken. Particularly,
I'm betting that Jifty is going to cache the first browser's langauge
preference and stick with it. It's all very fixable, but the I18N
support landed yesterday ;)
Best,
Jesse
More information about the jifty-devel
mailing list