Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

struts 2 i18n is not working, need help

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am trying to do i18n, created two property files: text_en and text_ru. if i save it as ASCII i can get value in english, but not in russian (characters get corrupted).
if i save it as UTF-8, seems like property file is not accessible ( tag is displayed not value )
any ideas how to solve the problem?
thank you.
 
Alex Bokov
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
just forgot, i am using tomcat as a server
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read up on Java properties/I18N/messages. native2ascii turns natively-encoded files into something Java can understand.
 
Alex Bokov
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i tried! saved file as Unicode, then run:
native2ascii.exe -encoding unicode text_ru_utf8.txt text_ru.properties

but still see only ???
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the response encoding set correctly? Is the browser set up correctly? Sometimes server settings may need to be tweaked as well. I mean, I can pretty much guarantee it's not an S2 issue as I can spit out Chinese with no issue. Maybe also try on the struts-user mailing list; I know there are people on there making Russian apps.
 
reply
    Bookmark Topic Watch Topic
  • New Topic