Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package messages;
|
---|
3 |
|
---|
4 | import java.util.MissingResourceException;
|
---|
5 | import java.util.ResourceBundle;
|
---|
6 |
|
---|
7 | public final class Messages {
|
---|
8 | private static final String BUNDLE_NAME = "resources/msg.messages";
|
---|
9 |
|
---|
10 | private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
|
---|
11 |
|
---|
12 | private Messages() {
|
---|
13 | }
|
---|
14 |
|
---|
15 | public static String getString(String key) {
|
---|
16 | try {
|
---|
17 | return RESOURCE_BUNDLE.getString(key);
|
---|
18 | } catch (MissingResourceException e) {
|
---|
19 | return '!' + key + '!';
|
---|
20 | }
|
---|
21 | }
|
---|
22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.