On my JSF pages, I can easily call my resource bundle using something like this
#{msg.formatwidth}
However, I also want to call my resourceBundle with my current choosen language in my backbean. The standard netbeans generated code for that is
java.util.ResourceBundle.getBundle("resource/messages_en").getString("dbupdate")
but that will only get it in english eventhough my language is set ti french or ducth. How can I achieve this?
You need to use the
getBundle()method which takes a locale.