Is JOptionPane internationalized ?

2001-09-27 Thread Bharat



Hi folks,

I am testing my software for internationalization 
(Japanese) on w2k and solaris.I am using JOptionPane for warning dialogs, 
error dialogs etc. On Japanese W2k machine the "OK", "Cancel".. buttons are 
displayed in Japanese but on Japanese solaris machine they are still displayed 
in english.
I am using jre1.3.Are there any registered 
bug for this? I saw some bugs but they all are closed.

Thanks
- bharat




RE: Is JOptionPane internationalized ?

2001-09-27 Thread Farwell, Paul

Yes, JOptionPane is internationalized provided that you have an
internationalized version of the plugin AND the user's computer has the
appropriate locale configured for their Regional Settings (at least for
Windows).

A simple shortcut that avoids having the user change their regional settings
is to set these UIManager properties for the Yes/No/OK/Cancel buttons,
substituting language specific strings as appropriate. As far as I know,
these are the only Strings which JOptionPane supplies itself. The remainder
of the Strings (e.g. title and message) are supplied by the developer.

Object[] settings = {
//...
OptionPane.cancelButtonText, getLocalizedString(shared.cancel),
OptionPane.noButtonText, getLocalizedString(shared.no),
OptionPane.okButtonText, getLocalizedString(shared.ok),
OptionPane.yesButtonText, getLocalizedString(shared.yes),
//...
};
UIDefaults defaults = UIManager.getDefaults();
defaults.putDefaults(settings);


The call to getLocalizedString() is simply our convenience call to a
ResourceBundle lookup.


-Original Message-
From: Keith Bennett
To: Bharat
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: 9/27/01 10:43 AM
Subject: Re: Is JOptionPane internationalized ?

Bharat -

Check to see if the rt.jar in your Solaris JRE contains a Japanese
language file named basic_jp.properties.  This is the file would
probably contain the Japanese strings.  (The file basic.properties is
what contains the English strings.)

However, there are several problems with JFileChooser.  For details,
check out the Javadoc in this TFileChooser class I wrote:

http://www.cpcug.org/user/kbennett/java/TFileChooser.java

Use of this class, and supporting configuration, corrects the
JFileChooser problems.  Hopefully in JDK 1.4 these things will all be
fixed.

By the way, can anyone suggest a place for me to send/put this file so
that it is available to the Java community?

Thanks.

- Keith


 Bharat wrote:
 
 Hi folks,
 
 I am testing my software for internationalization (Japanese) on w2k
 and solaris. I am using JOptionPane for warning dialogs, error dialogs
 etc. On Japanese W2k machine the OK, Cancel.. buttons are
 displayed in Japanese but on Japanese solaris machine they are still
 displayed in english.
 I am using jre1.3. Are there any registered bug for this? I saw some
 bugs but they all are closed.
 
 Thanks
 - bharat
 

___
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing
___
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing



Re: [Advanced-java] Re: Is JOptionPane internationalized ?

2001-09-27 Thread Bharat

Yes basic_jp.properties is missing from rt.jar. Is there any i18n version of
jre available ? Or I can get basic_jp.properties from somewhere ?

Thanks
- bharat

 Bharat -

 Check to see if the rt.jar in your Solaris JRE contains a Japanese
 language file named basic_jp.properties.  This is the file would
 probably contain the Japanese strings.  (The file basic.properties is
 what contains the English strings.)

 However, there are several problems with JFileChooser.  For details,
 check out the Javadoc in this TFileChooser class I wrote:

 http://www.cpcug.org/user/kbennett/java/TFileChooser.java

 Use of this class, and supporting configuration, corrects the
 JFileChooser problems.  Hopefully in JDK 1.4 these things will all be
 fixed.

 By the way, can anyone suggest a place for me to send/put this file so
 that it is available to the Java community?

 Thanks.

 - Keith


  Bharat wrote:
 
  Hi folks,
 
  I am testing my software for internationalization (Japanese) on w2k
  and solaris. I am using JOptionPane for warning dialogs, error dialogs
  etc. On Japanese W2k machine the OK, Cancel.. buttons are
  displayed in Japanese but on Japanese solaris machine they are still
  displayed in english.
  I am using jre1.3. Are there any registered bug for this? I saw some
  bugs but they all are closed.
 
  Thanks
  - bharat
 
 
 ___
 Advanced-java mailing list
 [EMAIL PROTECTED]
 http://lists.xcf.berkeley.edu/mailman/listinfo/advanced-java


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

___
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing



RE: How to restric japanese characters

2001-09-27 Thread Pepelis, Aaron



remember to do it on a KeyRelease.
Otherwise, the character wouldn't be there to remove if 
need be.
aaron

  -Original Message-From: Bharat 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, September 27, 2001 1:08 
  AMTo: Bharat; [EMAIL PROTECTED]; [EMAIL PROTECTED]; 
  [EMAIL PROTECTED]Subject: Re: How to restric japanese 
  characters
  Hi folks,
  
  First, I must thank you for all ur responses. 
  
  I have come to a solution which is working so 
  far.
  
  I have added a keylistener to my JtextField which 
  is validating each character which is typed or pasted in the 
  textfiled.
  I have written following code to check if the 
  character is non english.
  public static boolean isNonEnglishChar(char 
  c){int i = (int) 
  c;System.out.println("char " +c +" =" + i);if( 
  (i32) || ( i126))return 
  true;return false;}
  
  Comments ???
  
  - bharat
  
- Original Message - 
From: 
Bharat 
To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] 
; [EMAIL PROTECTED] 
Sent: Wednesday, September 26, 2001 
9:29 AM
Subject: How to restric japanese 
characters

Hi folks,

I want my JTextField to accept only english 
characters and it should reject japanese(or any other language) 
characters.
Is there anyapi to do it?or a 
sample code which will help ?

Thanks,
- bharat



RE: [Advanced-java] RE: How to restric japanese characters

2001-09-27 Thread Gart, Mitch



I'm 
not sure when KeyRelease would get called. Remember that for 
typing
some 
Kanji characters a user might physically type and release 2 or more 

physical keys on the keyboard, and those keys would be combined into 
1
Kanji 
character by an input method. You want something that is called 
when
the 
input method gets done changing the character. Is KeyRelease 
the
right 
place? Its name would imply that it is not.

The 
below isNonEnglishChar() method is right, sort of, although it would 

allow 
in accented characters in the range of 128-255 which are used in 
the
European Latin-1 character sets, but not used in 
English.
- Mitch 

  -Original Message-From: Pepelis, Aaron 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, September 27, 2001 
  8:55 AMTo: [EMAIL PROTECTED]; [EMAIL PROTECTED]; 
  [EMAIL PROTECTED]Subject: [Advanced-java] RE: How to restric 
  japanese characters
  remember to do it on a 
KeyRelease.
  Otherwise, the character wouldn't be there to remove 
  if need be.
  aaron
  
-Original Message-From: Bharat 
[mailto:[EMAIL PROTECTED]]Sent: Thursday, September 27, 2001 1:08 
AMTo: Bharat; [EMAIL PROTECTED]; [EMAIL PROTECTED]; 
[EMAIL PROTECTED]Subject: Re: How to restric japanese 
characters
Hi folks,

First, I must thank you for all ur responses. 

I have come to a solution which is working so 
far.

I have added a keylistener to my JtextField 
which is validating each character which is typed or pasted in the 
textfiled.
I have written following code to check if the 
character is non english.
public static boolean 
isNonEnglishChar(char c){int i = (int) 
c;System.out.println("char " +c +" =" + 
i);if( (i32) || ( i126))return 
true;return false;}

Comments ???

- bharat

  - Original Message - 
  From: 
  Bharat 
  To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] 
  ; [EMAIL PROTECTED] 
  Sent: Wednesday, September 26, 2001 
  9:29 AM
  Subject: How to restric japanese 
  characters
  
  Hi folks,
  
  I want my JTextField to accept only english 
  characters and it should reject japanese(or any other language) 
  characters.
  Is there anyapi to do it?or 
  a sample code which will help ?
  
  Thanks,
  - bharat