package pt.utl.ist.sotis.conversion; import java.util.MissingResourceException; import java.util.ResourceBundle; import pt.utl.ist.fenix.tools.util.i18n.Language; public class SotisMetadataResources { private static final String BUNDLE_NAME = "pt.utl.ist.sotis.conversion.SotisMetadataResources"; //$NON-NLS-1$ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME, Language.getLocale()); private SotisMetadataResources() { } public static String getString(String key, String... args) throws MissingResourceException { String message = RESOURCE_BUNDLE.getString(key); for (int i = 0; i < args.length; i++) { message = message.replace("{" + i + "}", args[i]); } return message; } }