Skip to content

LocaleEditor cannot parse language tag with script like zh-Hans #33348

Closed
@aperrillat

Description

@aperrillat

When I tried to load locales from application.yml to List<Locale>, Spring Framework's LocaleEditor is called to map it, but locales with scripts like zh-Hans or zh-Hant are not handled correctly because the locale is not loaded with the Locale.forLanguageTag method.

In method setAsText of LocaleEditor, the call to StringUtils.parseLocaleString should probably be replaced with StringUtils.parseLocale like it is in StringToLocaleConverter.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions