01: package net.sourceforge.pmd.util.viewer.util;
02:
03: import java.util.ResourceBundle;
04:
05: /**
06: * helps with internationalization
07: *
08: * @author Boris Gruschko ( boris at gruschko.org )
09: * @version $Id: NLS.java 4217 2006-02-10 14:15:31Z tomcopeland $
10: */
11: public class NLS {
12: private final static ResourceBundle bundle;
13:
14: static {
15: bundle = ResourceBundle
16: .getBundle("net.sourceforge.pmd.util.viewer.resources.viewer_strings");
17: }
18:
19: /**
20: * translates the given key to the message
21: *
22: * @param key key to be translated
23: * @return translated string
24: */
25: public static String nls(String key) {
26: return bundle.getString(key);
27: }
28: }
|