1 /**
2 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3 */
4 package net.sourceforge.pmd.util.viewer.util;
5
6 import java.util.ResourceBundle;
7
8 /**
9 * helps with internationalization
10 *
11 * @author Boris Gruschko ( boris at gruschko.org )
12 * @version $Id$
13 */
14 public class NLS {
15 private final static ResourceBundle BUNDLE;
16
17 static {
18 BUNDLE = ResourceBundle.getBundle("net.sourceforge.pmd.util.viewer.resources.viewer_strings");
19 }
20
21 /**
22 * translates the given key to the message
23 *
24 * @param key key to be translated
25 * @return translated string
26 */
27 public static String nls(String key) {
28 return BUNDLE.getString(key);
29 }
30 }
31