comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/resources/Resources.java @ 2166:2898b1ff6013

I18N for WINFO calculation result messages. flys-artifacts/trunk@3758 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 24 Jan 2012 22:59:44 +0000
parents e0fec407a280
children 6f4a1f513e89
comparison
equal deleted inserted replaced
2165:637dd38d0e2f 2166:2898b1ff6013
88 Locale locale = meta.getPreferredLocale(locales); 88 Locale locale = meta.getPreferredLocale(locales);
89 89
90 return getMsg(locale, key, def); 90 return getMsg(locale, key, def);
91 } 91 }
92 92
93 public static String getMsg(
94 CallMeta meta,
95 String key,
96 Object[] args
97 ) {
98 return getMsg(meta, key, key, args);
99 }
93 100
94 /** 101 /**
95 * Returns a translated message based on a template specified by <i>key</i> 102 * Returns a translated message based on a template specified by <i>key</i>
96 * that has necessary values to be filled in. 103 * that has necessary values to be filled in.
97 * 104 *
106 CallMeta meta, 113 CallMeta meta,
107 String key, 114 String key,
108 String def, 115 String def,
109 Object[] args) 116 Object[] args)
110 { 117 {
111 String template = getMsg(meta, key, null); 118 String template = getMsg(meta, key, (String)null);
112 119
113 if (template == null) { 120 if (template == null) {
114 return def; 121 return def;
115 } 122 }
116 123

http://dive4elements.wald.intevation.org