You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Kaare Rasmussen <ka...@kakidata.dk> on 2002/11/05 21:24:39 UTC
I17n && submit
EmbPerl 2.x
I'd like to prepare my application for several languages. If I have these
submit buttons:
<input type="submit" name="submit" value="[=Update=]">
<input type="submit" name="submit" value="[=Delete=]">
<input type="submit" name="submit" value="[=New=]">
What would I get back in $fdat{submit} if it is in Danish and I push on the
Update ("Opdater") button?
Will it be Update?
Will it be Opdater? If so, any way to do the correct comparison?
--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2501
Howitzvej 75 Åben 12.00-18.00 Email: kar@kakidata.dk
2000 Frederiksberg Lørdag 12.00-16.00 Web: www.suse.dk
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: I17n && submit
Posted by Kaare Rasmussen <ka...@kakidata.dk>.
> gettext will give you the same text as [= =] does. I would to prefer
...
> [$ if $fdat{update} $]
It has a downside too. If I'd like to handle all the submit functions in one
section, the code will look ugly.
But there's a choice :-)
--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2501
Howitzvej 75 Åben 12.00-18.00 Web: www.suse.dk
2000 Frederiksberg Lørdag 12.00-16.00 Email:kar@kakidata.dk
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: I17n && submit
Posted by Gerald Richter <ri...@ecos.de>.
> EmbPerl 2.x
>
> I'd like to prepare my application for several languages. If I have these
> submit buttons:
>
> <input type="submit" name="submit" value="[=Update=]">
> <input type="submit" name="submit" value="[=Delete=]">
> <input type="submit" name="submit" value="[=New=]">
>
> What would I get back in $fdat{submit} if it is in Danish and I push on
the
> Update ("Opdater") button?
>
It will be "Opdater". You can do
[$ if $fdat{submit} eq $r -> gettext('Update') $] ....
gettext will give you the same text as [= =] does. I would to prefer
<input type="submit" name="update" value="[=Update=]">
<input type="submit" name="delete" value="[=Delete=]">
<input type="submit" name="new" value="[=New=]">
[$ if $fdat{update} $]
...
[$ if $fdat{delete} $]
....
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org