There's an issue with your code, I'm not sure if it's a bug or not.
It gives me this error:
com.google.gwt.core.client.JavaScriptException: (ReferenceError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(7), JavaScript object(5), JavaScript object(13)]): langDef is not defined
It works if I changed it to:
Moment.lang("es", null);
On Monday, March 25, 2013 9:00:38 PM UTC+3, Sebastián Gurin wrote:
yes is it possible. Take a look at http://momentjs.com/docs/#/i18n/ for seeing how momentjs support internationalization (you must load an extra .js with the desired "language definitions"). YOu can find all the locales files here: https://github.com/timrwood/moment/tree/develop/min/lang
I just made an example on how to do this using momentgwt:
https://github.com/cancerberoSgx/momentgwt/blob/ master/momentgwttest/ momentgwttest1/src/org/sgx/ momentgwttest1/client/tests/ InternationalizationTest1.java
Hope that helps
On Monday, March 25, 2013 2:11:45 PM UTC-3, Mohammad Al-Quraian wrote:Thanks for the fix, do you know how can I change the locale/language (if that's possible)?Or if it's possible to adopt to the locale of the browser?Cheers
On Monday, March 25, 2013 7:09:09 PM UTC+3, Sebastián Gurin wrote:Problem fixed. That .jar contains 2 projects inside: momentgwt and gwtjsutil - (an utility library of mine for easier javascript wrapper libraries development). Jar replaced. Sorry for the inconvenience
On Sunday, March 24, 2013 3:43:10 PM UTC-3, Mohammad Al-Quraian wrote:When I tried to use the example:
Moment.moment().add(2, "days").format("MMMM Do YYYY, h:mm:ss a")After inheriting the required module and including the jar, it gives me this error:The type org.sgx.jsutil.client.JsObject cannot be resolved. It is indirectly referenced from required .class files
On Thursday, March 21, 2013 10:22:15 PM UTC+3, Sebastián Gurin wrote:I just released a GWT wrapper for the nice JavaScript library momentjs (momentjs.com). It resulted on a small and easy to use alternative for working with dates, calendars, intervals, date formats, date internationalization, etc.
https://github.com/cancerberoSgx/momentgwt
Hope it can be of help to somebody working with dates, calendars, etc.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment