//The modified sources are available under the "Common Public License"
//with permission from the original author: Daniel Wunsch
+import java.io.IOException;
+import java.io.InputStream;
import java.text.MessageFormat;
import java.util.MissingResourceException;
+import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
+import net.sourceforge.phpeclipse.wiki.editor.WikiEditorPlugin;
+
+import org.eclipse.core.runtime.Path;
+
public class WikiProperties {
private static final String PACKAGE_NAME = WikiProperties.class.getPackage().getName();
private ResourceBundle fgResourceBundle = null;
protected WikiProperties(String locale) {
- RESOURCE_BUNDLE = PACKAGE_NAME + "." + locale;
- fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
+ try {
+ InputStream is = WikiEditorPlugin.getDefault().openStream(new Path("wikis/"+locale+".properties"));
+ fgResourceBundle = new PropertyResourceBundle(is);
+// RESOURCE_BUNDLE = PACKAGE_NAME + "." + locale;
+// fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
}
public String getString(String key) {