spring-framework / org.springframework.beans.propertyeditors / LocaleEditor

LocaleEditor

open class LocaleEditor : PropertyEditorSupport

Editor for java.util.Locale, to directly populate a Locale property.

Expects the same syntax as Locale's toString, i.e. language + optionally country + optionally variant, separated by "_" (e.g. "en", "en_US"). Also accepts spaces as separators, as alternative to underscores.

Author
Juergen Hoeller

Since
26.05.2003

See Also
java.util.Localeorg.springframework.util.StringUtils#parseLocaleString

Constructors

<init>

LocaleEditor()

Editor for java.util.Locale, to directly populate a Locale property.

Expects the same syntax as Locale's toString, i.e. language + optionally country + optionally variant, separated by "_" (e.g. "en", "en_US"). Also accepts spaces as separators, as alternative to underscores.

Functions

getAsText

open fun getAsText(): String

setAsText

open fun setAsText(text: String): Unit