• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

translation the message in display tag

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Accept-Language HTTP header is en-US
how to make it arabic
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can set that in your browser.
 
Aya Muhannad
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I set it but there is no any change
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Could you hold this puppy for a sec? I need to adjust this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic