Win a copy of Functional Design and Architecture this week in the Functional programming 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:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

How do you localize your database data?

 
Ranch Hand
Posts: 199
2
Netbeans IDE PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Best ranchers!

I need some help with localizing data in an embedded derby database. So far the project will support only two languages and thats Swedish and English.
I am a beginner at internationalization I have not gotten that very far in this area. This is more of a question to se how this is done in real world applications.
I know how do change the language in an application



and then



But its the database part that I am having great issues with. Could someone start an example that populate a localized database table with words in any languages.
How do you localize your applications when it comes to the database part?

Thank you so much for your time!

Best regards,
Robert!

 
Saloon Keeper
Posts: 7089
165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What kind of data is this? How is it structured, and what purpose does it have?

The most common use of localized text is to display the GUI in different languages, based on the user's choice of language. Those texts would generally be held in properties files in the Java world. You can find extensive tutorials on that at https://docs.oracle.com/javase/tutorial/i18n/intro/.
 
Saloon Keeper
Posts: 24283
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are two aspects to this.

One is the database itself. When you create a database, one of the parameters that generally forms it is the code page that its tables will use. It often has a default, such as UTF-8, and thus many people won't see it, but it's important if you have I18N requirements. A strictly ASCII code page, for example, couldn't manage Swedish text, as it's strictly un-decorated USA characters. NOT English, incidentally. No £ symbol! ASCII-Z, on the other hand, extends to most European alphabets. UTF-8 and Unicode can handle even more, going all the way up to Chinese and cuneiform.

So you want to make sure you can hold everything properly.

Then there's the consideration of the applications themselves. General business data would typically not be segregated by language. Señor Rodrigues is still Señor Rodrigues  no matter what language you are using. But if you're storing constant values such as a list of application error messages, you'd either have a different table for each language or - more likely - have one table with a language key. But after that, the burden is on the application.
 
Let's get him boys! We'll make him read this tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic