|
From: Chris M. <Chr...@te...> - 2002-11-20 07:53:22
|
Hello,
I'm trying to think of a way to allow for a language selection in OI. I've
had an idea or two, but I thought it might be best to 'consult the
oracle'... Maybe there is a better way? Maybe my idea is unworkable? Note
that I have finally upgraded to 1.54...
So to provide to multiple languages for both logged in and not logged in
users, I need to have a persistent reference to a users language selection
throughout all requests. This language selection needs to be accessible to
both handlers and templates/pages.
Create a new directive in server.ini like 'fr' for French, and point it to
the main template. My understanding is that this would have no other effect
than shoving this directive into $R->{ui}{directive} and I'm thinking I
should be able to get at that in my handlers and pass it into my templates
(and hack it into base_page). I could then have all my templates branch on
this and have multiple language versions in each template. If I wanted to
be really crafty I would use widgets heavily to avoid either duplicating
HTML code or having some really untidy branching. The good bit is that this
is only needing to be done pages that non-admin types would see. One
possible issue I see immediately is that I would not be able to use popup or
notmpl directives as well as the fr directive, which might prove to be a bit
annoying...
I also wondered about putting a ?lang=fr at the end of all my URLs and
parsing off that instead.... Would that amount to the same thing?
Is there a better way?
Chris McDaniel
Service Development Architect
TELUS Business Solutions
Voice.416.883.4610 Cell.416.676.4654
|