문제

I have a problem with Netbeans' auto-generated initComponents() method in my Swing app.

The problem is that it is generating bundle with no respect for locale:

java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("myapp/Bundle_en"); // NOI18N

instead of:

java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("myapp/Bundle", myLocale);

I've tried to set default locale to desired one before calling initComponents(), but it does not work for me. The result is that my UI has mixed languages.

Could anyone explain me what I am doing wrong, please?

도움이 되었습니까?

해결책

I think you will be able to change generated code if you open your source and go to Tools | Internationalization | Internationalize.... There you can customize what expression is used to obtain I18N'ed value.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top