01: /*
02: * $RCSfile: JaiI18N.java,v $
03: *
04: * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
05: *
06: * Use is subject to license terms.
07: *
08: * $Revision: 1.1 $
09: * $Date: 2005/02/11 04:57:11 $
10: * $State: Exp $
11: */
12: package javax.media.jai;
13:
14: import com.sun.media.jai.util.PropertyUtil;
15: import java.text.MessageFormat;
16: import java.util.Locale;
17:
18: class JaiI18N {
19: static String packageName = "javax.media.jai";
20:
21: public static String getString(String key) {
22: return PropertyUtil.getString(packageName, key);
23: }
24:
25: public static String formatMsg(String key, Object[] args) {
26: MessageFormat mf = new MessageFormat(getString(key));
27: mf.setLocale(Locale.getDefault());
28:
29: return mf.format(args);
30: }
31: }
|