• Post Reply Bookmark Topic Watch Topic
  • New Topic

i18n and Properties file  RSS feed

 
Dylan Stamatopolis
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have to keep all of your translations in a properties file ?... or, is there a way to translate on the fly ?
It seems that maintaining a large properties file would be a mess, and would assume that there would be a way to dynamically translate data ?
Sorry for the lame question, but have only found ways to implement i18n by using a properties file, which seems quite tedius.
Any ideas ? Thanks !
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This would mean that someone is providing the ultimate translation component for every language. I am sorry to say but i think you will
have to translate that on your own. The only advantage of i18n is that
the Application takes the correct ressources for the different languages,
not to translate the data.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since this is not JSP-specific, I'm moving to to Java in General (Intermediate) where you may get a broader audience.
bear
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that maintaining a large properties file would be a mess
Well you'd probably want to use a ResourceBundle, which is like a set of property files, one per locale that you wish to provide a traslation for. Of course this still requires that someone perform the translations first, before the program is run.
and would assume that there would be a way to dynamically translate data ?
Well there are automatic translation services out there, with varying quality. There's certainly no standard API for this; it's not part of any core Java library. Automated traslations will almost certainly have some errors; for a professional application you'd usually want to have a proper translation done by a human. However in some cases you might want to take your chances with dynamic traslation, as it's better than nothing. Check out
http://babelfish.altavista.com/babelfish/tr
as a starting point.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!