01: package example;
02:
03: import java.util.MissingResourceException;
04: import java.util.ResourceBundle;
05:
06: /**
07: * @author tlroche
08: * @version $Id: CelsiusConverterStrings.java 1407 2004-12-31 04:49:48Z tlroche $
09: */
10: public class CelsiusConverterStrings {
11: private static final String BUNDLE_NAME = "example.CelsiusConverter";//$NON-NLS-1$
12:
13: private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
14: .getBundle(BUNDLE_NAME);
15:
16: private CelsiusConverterStrings() {
17: }
18:
19: public static String getString(String key) {
20: try {
21: return RESOURCE_BUNDLE.getString(key);
22: } catch (MissingResourceException e) {
23: return '!' + key + '!';
24: }
25: }
26: }
|