• Post Reply Bookmark Topic Watch Topic
  • New Topic

Supporting Different Languages for java in windows NOT "only" Android..  RSS feed

 
Niklas Karlsson
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I know if I program in java for Android I can put all the string:s in a string.xlm - file and then have different string-xx.xlm-files for different lang.
BUT:
can I do something similar if I program for a program in ex: windows?
(if I can ceck OS.langsetting and then use some "strings.xml-file" for this language..)
using: System.getProperty("user.language") and then do something smart..

or do some thing similar?

BEST REGARDS TO YOU ALL! :-)

 
Campbell Ritchie
Marshal
Posts: 56598
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe better to get a Locale object. Read the Java™ Tutorials, where there is a whole section about internationalisation.
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java has great support for multiple languages. It's called the i18n spec. Check out the ResourceBundle class.

I think you'll find this useful.
 
Niklas Karlsson
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
J. Kevin Robbins wrote:Java has great support for multiple languages. It's called the i18n spec. Check out the ResourceBundle class.

I think you'll find this useful.


interasting!!
:-)
does any have a link mini-example for this ?
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Java Tutorials link I gave you has examples. Another decent one is here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!