comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/resources/Resources.java @ 3170:79e7bba0f593

FixA: I18N for chart km service. flys-artifacts/trunk@4783 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 25 Jun 2012 15:59:47 +0000
parents 6f4a1f513e89
children 7f9fe694f8d1
comparison
equal deleted inserted replaced
3169:b6da650b0718 3170:79e7bba0f593
126 } 126 }
127 127
128 return MessageFormat.format(template, args); 128 return MessageFormat.format(template, args);
129 } 129 }
130 130
131 public static String format(
132 CallMeta meta,
133 String key,
134 String def,
135 Object ... args
136 ) {
137 String template = getMsg(meta, key, (String)null);
138
139 if (template == null) {
140 return template = def;
141 }
142
143 return MessageFormat.format(template, args);
144 }
131 145
132 /** 146 /**
133 * This method returns the translated value for <i>key</i> or <i>def</i> if 147 * This method returns the translated value for <i>key</i> or <i>def</i> if
134 * <i>key</i> is not existing in the resource bundle. 148 * <i>key</i> is not existing in the resource bundle.
135 * 149 *

http://dive4elements.wald.intevation.org