PDA

View Full Version : datepicker language



paserrano
14 Dec 2009, 12:22 AM
Hello

I would like to change the language of the labels that appears in the datepicker widget:

http://www.extjs.com/examples/pages/misc/datepicker.html

Anybody could help me? I want to put the labels in spanish instead english.

thanks

Shawn.in.Tokyo
14 Dec 2009, 3:17 AM
Did you look at the api?

com.extjs.gxt.ui.client.widget.DatePicker.DatePickerMessages


Look for the DatePicker and then scroll through. There is a Nested Class Summary
which had a link to it. It looks like you can set things there.

Shawn

paserrano
14 Dec 2009, 3:55 AM
Thanks por your post Shawn.in.Tokyo

This class allows me edit the value of a lot of string, but no the value of the name of the months, for example.

I figure that editing this file:

DateTimeConstants_.java

I can customize the value of a set of string with relation with the date picker. But I suppose that in the end of the name of the file, must be the prefix of the language (in my case, es).
But I am not sure...

thanks!

Arno.Nyhm
15 Dec 2009, 6:54 AM
if you switch your application language (like in GWT) then all the messages and also for the datepicker are in this language.


example for german:



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name='gwt:property' content='locale=de_DE'>
...


and / or in your MyApplication.gwt.xml



<?xml version="1.0" encoding="UTF-8"?>
<module>
<inherits name="com.google.gwt.user.User"/>
<inherits name="com.google.gwt.i18n.I18N"/>

<extend-property name="locale" values="de_DE"/>