Hallo Programmierer,
habe eine sehr kleine blöde Frage...
Ich habe die propertie-files (messages_de.properties und messages_en.properties) erstellt. Leider kann ich, "weiß" ich nicht wie man die Sprache ladet? Ich brauche die Methode, wo ich die Sprache laden kann?
so hab ich mal probiert:
ResourceBundle.getBundle("Messages",Locale.ENGLISH);
Aber folgende Exception tritt dann auf...
Danke für eure Bemühungen
mfg
habe eine sehr kleine blöde Frage...
Ich habe die propertie-files (messages_de.properties und messages_en.properties) erstellt. Leider kann ich, "weiß" ich nicht wie man die Sprache ladet? Ich brauche die Methode, wo ich die Sprache laden kann?
so hab ich mal probiert:
ResourceBundle.getBundle("Messages",Locale.ENGLISH);
Aber folgende Exception tritt dann auf...
Code:
Exception in thread "AWT-EventQueue-0" java.util.MissingResourceException: Can't find bundle for base name Messages, locale en
at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at contactManager.CategoryDialog.initComponents(CategoryDialog.java:185)
at contactManager.CategoryDialog.<init>(CategoryDialog.java:43)
at contactManager.MainWindow.categoryButtonActionPerformed(MainWindow.java:397)
at contactManager.MainWindow.access$6(MainWindow.java:396)
at contactManager.MainWindow$8.actionPerformed(MainWindow.java:223)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Danke für eure Bemühungen
mfg