File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes [i18n tiles] difference btw locale and lang Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "[i18n tiles] difference btw locale and lang" Watch "[i18n tiles] difference btw locale and lang" New topic

[i18n tiles] difference btw locale and lang

Alessandro Ilardo
Ranch Hand

Joined: Dec 23, 2005
Posts: 218
hi there, I'm fresh with struts and its tiles.
I'd like learn i18n and I'm now having a question about this tag <html:html locale="true">
It is shown on a tutorial by seems to be dreprecated, the alternative is attribute lang="....

what's the difference? Which I should use in i18n application?
Thanks in advance

trying to decode a woman mind....
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you specify lang="true" in an <html:html> tag, Struts simply takes the language used in the locale it stores in the session to produce a lang="<some language code>" attribute on the rendered <html> tag. This doesn't really do much. It's more of a meta-data attribute that can be used by search engines and browsers, and doesn't really affect the actual language content of the page. See this link.

Regarding your original question: Which I should use in i18n application?
The answer is pretty obious. You use the one that isn't deprecated. Struts just changed the attribute name in later versions so that it matched the attribute of the plain html tag it renders.
[ March 26, 2007: Message edited by: Merrill Higginson ]

Consultant, Sima Solutions
I agree. Here's the link:
subject: [i18n tiles] difference btw locale and lang
Similar Threads
Is this step neccessary
I18N end to end with pracital example
Error creating bean with name tilesConfigurer
Struts2 Internationalization
Difference Between LookupDispatch Action & DispatchAction?