Craig McClanahan writes:You don't need it at all if you're willing to let the user's language selection in the browser control everything (which is the default behavior). If you want to offer a "change Language" control, you'll need to use either lang="true" or locale="true" (and make sure there's a session) so that Struts can keep track of the user's non-default locale choice.
-----Original Message-----
From: Craig McClanahan [mailto:[EMAIL PROTECTED] Sent: Thursday, April 15, 2004 7:48 PM
To: Struts Users Mailing List
Subject: Re: Locale="true" in html:html tag
Joe Hertz wrote:
This has been deprecated in 1.2.with 1.2. The
My internationalized pages appear not to need this at all
Locale seems to get detected from the browser just fine without it.while I was
Since, I never got around to serious internationalization
using 1.1, I thought this was necessary for the jsp page toauto-select
it's locale. Am I misunderstanding what the purpose of locale="true" was?html:html tag
If not, how have things changed? Is it now assumed to be the default unless a lang specific lang parameter is specified in the
or something?functionality it
Basically it seems like it just went away, and now the
provided now shows up when it's needed "as if by magic",which I'm sure
ain't so. :-)okay, somewhat
What exactly has changed here? I'm kind of curious (and
suspicious) now...No conspiracies here :-). The deprecation comment about the "locale" attribute explains what is going on, and the description of the "lang" attribute describes the algorithm that is used.
http://jakarta.apache.org/struts/userGuide/struts-html.html#html
This page, like all the rest of the Struts documentation, is also available locally if you unpack (and perhaps deploy on a server) the struts-documentation.war webapp.
Actually, this page is what made me _start_ scratching my head...If I hadn't seen it, how would I known to ask about the lang attribute? :-)
So let me better explain myself.
In reading it before I made the assumption that lang was to specify the language for the page like this: <html:html lang="en">, and if I wanted the same functionality as before I needed to do something like <html:html lang="<%=language%>">. In reading it now, I'm gathering that's not the case :-), but anyway I figured I'd find the answer by experimenting a little...
And <drum roll>...without specifying Locale OR Lang, it displayed in Russian like a champ when I told IE6 to make Russian the primary language it looked for!
I was thusly inspired to post my question: Since it worked without specifying it, what does this tag really do for me? Under what circumstances do I really need to have this type of thing specified?
-Joe
Craig
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]