localized JFileChooser - howto

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

localized JFileChooser - howto

Marek Caltik
Hola amigos!

why don't have file choosers in KOSMO localized? JFileChooser is Swing
component frequently used in KOSMO, it contains some labels (Look in,
Save, Open...), which can be localized. If your KOSMO speaks some of
the 'main' languages, solution should be as simple as change your
swing's locale, Java translated labels already. Howto is available on
the net.
For other languages I'm sending this howto:

1. prepare your own JFileChooser.properties file. Bellow is attached
our slovak version, can be used as a template.
2. write simple static method, you can copy it from attached java source file.
3. call this static method somewhere near to KOSMO initialization, we
call it as first statement inside JUMPWorkbench.main() method.

KNOWN ISSUE: If you select folder (not a file) inside localized file
chooser, the open button has lost it's label. It is a bug, we don't
know how to fix it yet. The problem doesn't appear in default file
chooser. You can help, maybe we've missed something :-)

regards
Marek Caltik
Gista s.r.o

_______________________________________________
Kosmo_int mailing list
[hidden email]
http://lists.saig.es/mailman/listinfo/kosmo_int

JFileChooser.properties (5K) Download Attachment
GUIUtils.java (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: localized JFileChooser - howto

Sergio Baños Calvo
Good morning Marek.

We'll take care of your sending, it'll be a good improvement for Kosmo
UI. We'll also check the issue that you have pointed.

Thanks a lot for helping in improving Kosmo.

Regards,

Marek Caltik escribió:

> Hola amigos!
>
> why don't have file choosers in KOSMO localized? JFileChooser is Swing
> component frequently used in KOSMO, it contains some labels (Look in,
> Save, Open...), which can be localized. If your KOSMO speaks some of
> the 'main' languages, solution should be as simple as change your
> swing's locale, Java translated labels already. Howto is available on
> the net.
> For other languages I'm sending this howto:
>
> 1. prepare your own JFileChooser.properties file. Bellow is attached
> our slovak version, can be used as a template.
> 2. write simple static method, you can copy it from attached java source file.
> 3. call this static method somewhere near to KOSMO initialization, we
> call it as first statement inside JUMPWorkbench.main() method.
>
> KNOWN ISSUE: If you select folder (not a file) inside localized file
> chooser, the open button has lost it's label. It is a bug, we don't
> know how to fix it yet. The problem doesn't appear in default file
> chooser. You can help, maybe we've missed something :-)
>
> regards
> Marek Caltik
> Gista s.r.o
>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> Kosmo_int mailing list
> [hidden email]
> http://lists.saig.es/mailman/listinfo/kosmo_int

--

Sergio Baños Calvo

Jefe de desarrollos
Sistemas Abiertos de Información Geográfica, S.L. (SAIG S.L.)
Tlfno. móvil: 685005960
Tlfno. fijo: (+34) 954788876

E-mail: [hidden email]

_______________________________________________
Kosmo_int mailing list
[hidden email]
http://lists.saig.es/mailman/listinfo/kosmo_int