• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

translation the message in display tag

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use display tag library to show the result in my jsp code
but I need to translate the language of the message shown with paging to another language like Arabic
how can I make that?
my code
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This seems to be the relevant documentation: http://www.displaytag.org/1.2/i18n.html
 
Aya Muhannad
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Ulf Dittmer for response
I made the steps in that web site to support another language
I made the displaytag_ar.properties file and put it in WEB-INF folder contains follow row:
paging.banner.one_item_found=الاسم
but there is no any change

Can you help me in this problem
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would assume that DisplayTag uses the Accept-Language HTTP header to determine the locale to use. What value does that header have when you access the web app?
 
Aya Muhannad
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Accept-Language HTTP header is en-US
how to make it arabic
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can set that in your browser.
 
Aya Muhannad
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I set it but there is no any change
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the value of the Accept-Language header now?

You have restarted the web app, right?

Also be sure to read the "Advanced" and "Locale resoluton" sections on the page I linked to, just in case those apply to your situation.
 
Aya Muhannad
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read the read the "Advanced" and "Locale resoluton" sections on the page you linked
but I did not understand well
I put the following properties in file named by displaytag_ar.properties

locale.provider=org.displaytag.localization.I18nStrutsAdapter

locale.resolver=org.displaytag.localization.I18nStrutsAdapter
paging.banner.one_item_found=الأسم

there is no any change in the language
can you help me?
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never done this, so I can't help specifically, but only go by the documentation. So: Does Globals.LOCALE_KEY have the correct value?

The documentation says to put "locale.provider=org.displaytag.localization.I18nStrutsAdapter" into displaytag.properties; is that where it is?
 
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!