perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Shomodjvarac <shom...@slashmail.org>
Subject multilingual site
Date Mon, 18 Apr 2005 09:15:20 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi all.

I'm interested in your opinions on what is the easiest and simplest
solution for multilingual site. I have searched cpan and web and found
that Locale::Maketext::Lexicon is pretty nice solution. The only thing
that I don't like in this solution is that I need do generate locales
for every language that I will be using, but other than that I think it
works file, opinions?

This is how I plan to implement it.

Hello.pm
...
package Hello::I18N;
use base 'Locale::Maketext';

use Locale::Maketext::Lexicon {

~  hr => [Gettext => 'hello_hr.mo'],
~  en => [Gettext => 'hello_en.mo'],
~  _decode => 1

};

1;
...

index.asp
...
<%

use Hello;

my $lh = Hello::I18N->get_handle('hr_HR');

print $lh->maketext("Hello world!");

%>
...

Thanks.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCY3qnOQdrQCiYGEYRAsIHAKCBkJmlae5b9WGKrU2PRAJmNfqbNQCgiO+v
JS7/q/EYpqvBcdYfaj6WrrY=
=0nVf
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message