Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

localising in jdbc - rookie question

 
Ranch Hand
Posts: 173
2
Netbeans IDE PHP Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Best forumists!

What is the general approach to localising an application based using jdbc? My approach to localising has always been using
resource bundles for data that will be translated to a certain language after a users choice if available. Is it "general" to use a
table structure like the one listed below this line



and then to query this insert statement by using the following sql



I am not a beginner to java but most likely light years behind the majority here. I need some clearence to this issue.
So far i avoid localising in sql and stick to bundles or properties files. Many thanks in advance to any one interested
in helping me out here.

Best wishes and a happy new year to all!
Robert.

 
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've see localization done with property file, where the name of the file is the language, and the text is retrieved by key. But I don't know why it couldn't be a DB file. You just need a key (ID) for the text you're localizing.
 
Marshal
Posts: 69884
278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is an internationalisation page in the Java™ Tutorials. That should give you a start.
 
Robert Ingmarsson
Ranch Hand
Posts: 173
2
Netbeans IDE PHP Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Knute Snortum wrote:I've see localization done with property file, where the name of the file is the language, and the text is retrieved by key. But I don't know why it couldn't be a DB file. You just need a key (ID) for the text you're localizing.




Knute!

Thanks for the reply! I think i've hacked it, well as for as my guess goes, but did you meant something like



and then in java say something like this



Thanks for your answer again.
 
Knute Snortum
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was thinking more along the lines of the table name being the language, then select by a key for the text:
 
Robert Ingmarsson
Ranch Hand
Posts: 173
2
Netbeans IDE PHP Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Knute Snortum wrote:I was thinking more along the lines of the table name being the language, then select by a key for the text:



Hi, again!

I think i begin to understand, i am very lost at this issue. But your thinking appears as if it follows my own, but instead of localising the column
in the table that i do, you are localising, the table in its name? Should i then create one table for every language in every source of
content i want to translate?

/robert.
 
Knute Snortum
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I was thinking more along the lines of localizing only text that is displayed to the users, but if you are thinking of localizing every column, I would be more inclined to add a language abbreviation to each table.

customer_en
customer_es
customer_de
customer_sv
item_en
item_es
item_de
item_sv
etc.

 
    Bookmark Topic Watch Topic
  • New Topic