FileDocCategorySizeDatePackage
JMFI18N.javaAPI DocJMF 2.1.1e1407Mon May 12 12:20:44 BST 2003com.sun.media.util

JMFI18N

public class JMFI18N extends Object

Fields Summary
public static ResourceBundle
bundle
public static ResourceBundle
bundleApps
Constructors Summary
Methods Summary
public static java.lang.StringgetResource(java.lang.String key)


        
	//$$ Testing - cania
	//$$ java.util.Locale.setDefault(Locale.GERMANY);
	Locale currentLocale = java.util.Locale.getDefault();
	
	if (bundle == null) {
	    try {
		bundle = java.util.ResourceBundle.getBundle("com.sun.media.util.locale.JMFProps", currentLocale);
	    } catch(java.util.MissingResourceException e){
		System.out.println("Could not load Resources");
		System.exit(0);
	    }
	    try {
		bundleApps = java.util.ResourceBundle.getBundle("com.sun.media.util.locale.JMFAppProps", currentLocale);
	    } catch (java.util.MissingResourceException me) {
	    }
	}
	String value = "";
        try {
            value = (String) bundle.getObject(key);
        } catch (java.util.MissingResourceException e) {
	    if (bundleApps != null) {
		try {
		    value = (String) bundleApps.getObject(key);
		} catch (java.util.MissingResourceException mre) {
		    System.out.println("Could not find " + key);
		}
	    } else
		System.out.println("Could not find " + key);
	}
        return value;