HTML manual changes per #379.
[phpeclipse.git] / net.sourceforge.phpeclipse.phpmanual / src / net / sourceforge / phpeclipse / phpmanual / PHPManualUiMessages.java
diff --git a/net.sourceforge.phpeclipse.phpmanual/src/net/sourceforge/phpeclipse/phpmanual/PHPManualUiMessages.java b/net.sourceforge.phpeclipse.phpmanual/src/net/sourceforge/phpeclipse/phpmanual/PHPManualUiMessages.java
new file mode 100644 (file)
index 0000000..faf7411
--- /dev/null
@@ -0,0 +1,34 @@
+package net.sourceforge.phpeclipse.phpmanual;
+
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class PHPManualUiMessages {
+
+       private static final String BUNDLE_NAME = PHPManualUiMessages.class
+                       .getName();
+
+       private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+                       .getBundle(BUNDLE_NAME);
+
+       private PHPManualUiMessages() {
+       }
+
+       public static String getString(String key) {
+               try {
+                       return RESOURCE_BUNDLE.getString(key);
+               } catch (MissingResourceException e) {
+                       return '!' + key + '!';
+               }
+       }
+
+       public static String getFormattedString(String key, Object arg) {
+               return MessageFormat.format(getString(key), new Object[] { arg });
+       }
+
+       public static String getFormattedString(String key, Object[] args) {
+               return MessageFormat.format(getString(key), args);
+       }
+}
\ No newline at end of file