• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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! :-)

 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe better to get a Locale object. Read the Java™ Tutorials, where there is a whole section about internationalisation.
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Java Tutorials link I gave you has examples. Another decent one is here.
 
reply
    Bookmark Topic Watch Topic
  • New Topic