Alex
Alex

Reputation: 2986

GWT: how to use Locale.ENGLISH in client side?

I have a legacy class which contains toLowerCase( Locale.ENGLISH )

And when I use this class in my client side, I gets

[ERROR] [onboardingtool] Line 37: The method toLowerCase() in the type String is not applicable for the arguments (Locale)

But when I check GWT doc, it seems like ROOT, US and ENGLISH are already supported. Here is the link: http://www.gwtproject.org/doc/latest/RefJreEmulation.html (search for "LOCALE")

I am using GWT 2.6.1. How do I make it work?

Upvotes: 1

Views: 306

Answers (1)

Baz
Baz

Reputation: 36904

Locale is only supported in GWT 2.7.0 (RC1) and up.

Here are the release notes of GWT 2.7.0 (RC1), specifically:

"New emulated classes: Locale, NavigableSet, and NavigableMap"

and

"New emulated methods in Class, String, ..."


If you're using GWT 2.6.1, Locale and String#toLowerCase(Locale) won't be available.

Upvotes: 3

Related Questions