Package JavaFX applications with i18n not working
Answered
I worte javafx with i18n properties file which is inclued chinese and english and it's working fine.
But when I Package JavaFX applications with Create a new artifact configuration and run the program
The chinese is't show up, only the default English text is showup.
What I am missing?
Please sign in to leave a comment.
Hello,
Is it possible to attach screenshots with proper and wrong UI?
I have two properties files one is for englisth, the other is for chinese
In strings_en_us.properties
In strings_zh_cn.properties
And java code as following
locale = new Locale("zh", "cn");bundle = ResourceBundle.getBundle("strings", locale);
System.out.println("Lang:" + bundle.getString("lab_language"));
When running in IntellJ IDE it work fine and print out
"Lang:语言"
But when I package javafx with artifact and create the bundles folder, then Run the "exe" file in buldles folder, it will show
"Lang:Langeage"
Why the bundles exe version missing the string in the strings_zh_cn.properties file?
The exe file path show as following
Hmm, it's solved 😄
I just rename the properties file name
It must be capitalize in the packaged jar file.