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?
In reply to Multilingual Mason by crenz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |