Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[i18n tiles] difference btw locale and lang

 
Alessandro Ilardo
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic