How can I add localization to JFileChooser for a locale that is not supported by default?

后端 未结 2 1533
礼貌的吻别
礼貌的吻别 2020-12-06 02:28

The list of supported locales for User Interface Translation does not have all the languages I need to support. How can I add more languages for a JFileChooser

2条回答
  •  不思量自难忘°
    2020-12-06 02:56

    In fact it is possible to use properties file to translate standard Swing strings. Just call

    UIManager.getDefaults().addResourceBundle("com.mypackage.messages");
    

    where com.mypackage.messages is a fully-qualified bundle base name.

提交回复
热议问题