i18n

4 views
Skip to first unread message

achwell

unread,
Jan 12, 2011, 1:53:52 PM1/12/11
to wiquery-plugins
In com.wiquery.plugins.jqgrid.component.Grid.contribute, english
language is hardcoded
(wiQueryResourceManager.addJavaScriptResource(Resources.JS_JQUERY_LOC_EN);)
Language files for many other languages are included; wouldn't it be
nice to add possibility to use other languages?

Ernesto Reinaldo Barreiro

unread,
Jan 12, 2011, 4:07:49 PM1/12/11
to wiquery...@googlegroups.com
Hi,

AFAIK the plugin uses wicket 118n machinery. See [1], [2], and [3] lines

// resource related properties.
// read them from within the Wicket layer
// so that they can be configured the same as
// other Wicket components
for(String property: TEXT_PROPERTIES) {
String text = getResource(property);
if(StringUtils.isNotEmpty(text)) {
sb.append(property);
sb.append(": '");
sb.append(text.trim());
sb.append("',");
}
}

So, I think it is enough to add lines like

recordtext = Ver {0} - {1} de {2}
emptyrecords = No existen registros a mostrar
loadtext = Cargando...
pgtext = Página {0} de {1}

to the resources associated with the page or panel where you are using
the grid (of course. in the language you need)

Regards,

Ernesto

1-http://code.google.com/p/wiquery-plugins/source/browse/trunk/wiquery-plugins/jqgrid/src/main/java/com/wiquery/plugins/jqgrid/component/Grid_es.properties?r=211
2-http://code.google.com/p/wiquery-plugins/source/browse/trunk/wiquery-plugins/jqgrid/src/main/java/com/wiquery/plugins/jqgrid/component/Grid_en.properties?r=211
3-http://code.google.com/p/wiquery-plugins/source/browse/trunk/wiquery-plugins/jqgrid/src/main/java/com/wiquery/plugins/jqgrid/component/Grid.java?r=211

Reply all
Reply to author
Forward
0 new messages