2 * (c) Copyright IBM Corp. 2000, 2001.
5 package net.sourceforge.phpdt.internal.ui;
7 import java.text.MessageFormat;
8 import java.util.MissingResourceException;
9 import java.util.ResourceBundle;
11 public class PHPUIMessages {
13 private static final String RESOURCE_BUNDLE = PHPUIMessages.class.getName();//$NON-NLS-1$
15 private static ResourceBundle fgResourceBundle = ResourceBundle
16 .getBundle(RESOURCE_BUNDLE);
18 private PHPUIMessages() {
21 public static String getString(String key) {
23 return fgResourceBundle.getString(key);
24 } catch (MissingResourceException e) {
25 return '!' + key + '!';
29 public static String getFormattedString(String key, String arg) {
30 return getFormattedString(key, new String[] { arg });
33 public static String getFormattedString(String key, String[] args) {
34 return MessageFormat.format(getString(key), args);