git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@31363 d1611594-4594-4d17-8e1d-87c2c4800839
parent
c5d5f91812
commit
adc8def6d4
|
@ -20,6 +20,7 @@ public class MyLabelLocatorGeneral implements org.zkoss.util.resource.LabelLocat
|
|||
|
||||
private static Logger log = Logger.getLogger(MyLabelLocatorGeneral.class);
|
||||
private ServletContext _svlctx;
|
||||
private static final Locale localeEspanhol = new Locale("es");
|
||||
|
||||
public MyLabelLocatorGeneral(ServletContext svlctx) {
|
||||
if (svlctx == null) {
|
||||
|
@ -32,16 +33,16 @@ public class MyLabelLocatorGeneral implements org.zkoss.util.resource.LabelLocat
|
|||
public URL locate(Locale locale) {
|
||||
URL resource = null;
|
||||
try {
|
||||
resource =_svlctx.getResource("/WEB-INF/" + getI3LabelName(locale));
|
||||
if (resource == null){
|
||||
resource= _svlctx.getResource("/WEB-INF/" + getI3LabelDefault());
|
||||
resource = _svlctx.getResource("/WEB-INF/" + getI3LabelName(locale));
|
||||
if (resource == null) {
|
||||
resource = _svlctx.getResource("/WEB-INF/" + getI3LabelDefault());
|
||||
}
|
||||
} catch (MalformedURLException ex) {
|
||||
log.error("Error al cargar locale:"+locale,ex);
|
||||
log.error("Error al cargar locale:" + locale, ex);
|
||||
try {
|
||||
resource= _svlctx.getResource("/WEB-INF/" + getI3LabelDefault());
|
||||
resource = _svlctx.getResource("/WEB-INF/" + getI3LabelDefault());
|
||||
} catch (MalformedURLException ex1) {
|
||||
log.error("Error al cargar la traduccion estandard.",ex1);
|
||||
log.error("Error al cargar la traduccion estandard.", ex1);
|
||||
throw new RuntimeException(ex1);
|
||||
}
|
||||
}
|
||||
|
@ -50,9 +51,16 @@ public class MyLabelLocatorGeneral implements org.zkoss.util.resource.LabelLocat
|
|||
}
|
||||
|
||||
private static final String getI3LabelName(Locale locale) {
|
||||
|
||||
if ((locale != null) && (locale.getLanguage().equals(localeEspanhol.getLanguage()))) {
|
||||
return "i3-label_es_MX.label";
|
||||
}
|
||||
|
||||
return "i3-label_" + locale + ".label";
|
||||
}
|
||||
|
||||
private static final String getI3LabelDefault() {
|
||||
return "i3-label_pt_BR.label";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
ADM_20131002_1RC244
|
||||
ADM_20131003_1RC245
|
||||
|
|
Loading…
Reference in New Issue