punkish has asked for the wisdom of the Perl Monks concerning the following question:
Right. Now we want to set up all the templates in different languages. So when folks from Germany visit the website, they get welcome.de.tmpl, folks from Latin America get welcome.es.tmpl, and us folks get welcome.en.tmpl.
Easy to do with Apache and its content negotiation. The browser (hopefully) sends a header, and Apache serves the correct language pages. Of course, if some goes snafu, the browser doesn't send the correct header, or the user simply wants to see another language, I can have a pull-down menu or some such widget to let the user switch languages.
But, everything is being intercepted and acted upon by our favorite language, so how do I do the content negotiation with Perl/CGI::Application?
Update: I guess I could make lang specific index.cgi... so, index.en.cgi, index.de.cgi, and so on, which then would call the appropriate templates. But that would be so lame... any changes in my program and I would have to make the change as many times as my lang versions. Oh what to do, what to do?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: content negotiation with Apache/cgi
by Rhandom (Curate) on Apr 24, 2007 at 14:47 UTC | |
by punkish (Priest) on Apr 25, 2007 at 02:06 UTC | |
|
Re: content negotiation with Apache/cgi
by MonkE (Hermit) on Apr 24, 2007 at 13:16 UTC | |
by punkish (Priest) on Apr 24, 2007 at 14:48 UTC | |
|
Re: content negotiation with Apache/cgi
by benmaynard (Initiate) on Apr 24, 2007 at 19:28 UTC |