From: "Johan Vromans" <[EMAIL PROTECTED]>
"Octavian Rasnita" <[EMAIL PROTECTED]> writes:

Hi,

I've seen that WxPerl uses gettext as the base for Wx::Locale, just
like Catalyst framework uses gettext in Catalyst::Plugin::I18N.

In Catalyst I can do:

t("The name of the city is [_1]", $city);
or
t("The cities are [_1], [_2] and [_3]", [$city1, $city2, $city3]);

This is very convenient, because in some languages the position of the
variable parts in the phrase is different than in English.

I've tried to do the same thing with Wx::Locale, but it gave an error.
It seems that it accepts a single parameter, not more.

Is there another way of doing in a WxPerl application the same thing
that could be done in Catalyst?

AFAIK, Wx::Locale is based on gettext.

In gettext, you can do:

 __x("The cities are {first}, {second} and {third}",
     first => $city1, second => $city2, third => $city3);

Probably this also works with Wx::Locale?

-- Johan

Unfortunately it doesn't work that way neither.

It gives the error:

Usage: Wx::GetTranslation(string)

Octavian

Reply via email to