Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

Localization Of Desktop Icons For An desktop Application  RSS feed

 
Ikram Shahzad
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Report post to moderator
hi guys,

I am trying make a desktop in java. i want to localize it for different language. For english it should start from left most to right and for arabic right most to left.not in the center of screen. can any body have some suggestion about it.

 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Component has a method called getComponentOrientation, which returns an instance of ComponentOrientation. This has methods isHorizontal() (which will most likely return false for Japanese) and more important for you, isLeftToRight().

You can also get a ComponentOrientation instance by calling ComponentOrientation.getOrientation(Locale). Use this with Locale.getDefault() to get the orientation for the current locale.


Edit: I've just done some testing, and the orientation will only be left to right if the locale's language is one of iw, ar, fa or ur. isHorizontal() always returns true, even for Japanese.

You should still be able to use it though.


I just found your other thread which is exactly the same, so this one will be closed.
[ August 04, 2008: Message edited by: Rob Prime ]
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!