crenz has asked for the wisdom of the Perl Monks concerning the following question:
So far I've been using a home-brewn Perl-in-HTML interpreter to realize multilingual webpages. For example, I'll have URLS like
http://server/de/page.html http://server/en/page.html
I then configured mod_rewrite to redirect these to the "true" file and set an environment variable LANG=de (or LANG=en). In my HTML file, I write
bla bla bla <!en>English page only <!de>Nur auf der deutschen Seite <!>This is gonna appear in both versions again again
Now, I'm looking to reimplement the system using something more standardized, feature-rich and tested (my C code realizing this interpreter is a mess...). I'm thinking of using Mason. However, I don't want to do lengthy checks like if ($ENV{LANG} eq "en" { ..... The point of the system is to have a short command so that I can freely intermix different languages, making it more easy to translate a webpage.
Would I have to modify Mason's parser to realise concise tags like <!de>, or can someone come up with a nice way to implement something like this more easily?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Multilingual Mason
by valdez (Monsignor) on May 03, 2003 at 11:58 UTC | |
by crenz (Priest) on May 03, 2003 at 12:23 UTC | |
by valdez (Monsignor) on May 03, 2003 at 12:55 UTC | |
by crenz (Priest) on May 03, 2003 at 15:03 UTC | |
by aquarium (Curate) on May 04, 2003 at 11:02 UTC | |
|
Re: Multilingual Mason
by Anonymous Monk on May 05, 2003 at 08:19 UTC | |
by crenz (Priest) on May 05, 2003 at 10:05 UTC |