View Javadoc

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