Reputation: 11
I want to change language of display text in java application using eclipse IDE.
So I am trying to use resourse=ResourceBundle.getBundle("Text",Locale.ENGLISH );
but while running getting error as
Exception in thread "main" java.util.MissingResourceException: Can't
find bundle for base name Text, locale en".
Can someone help me in solving this. What I understood is I have to get some config file for this, but I not sure from where I can get it.
Please let me know where I can find this file and how to import in project.
Upvotes: 1
Views: 72
Reputation: 36601
Sounds like you want to use a ResourceBundle
backed by a Properties
file. This is explained here.
It boils down to the following steps:
ResourceBundle#getBundle
with the correct nameMore information and examples can be found in the official tutorials:
ResourceBundle
tutorialResourceBundle
javadocUpvotes: 2