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