You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2013/04/22 11:49:16 UTC
[jira] [Resolved] (LANG-889) If locale is "pt_pt", it's not a
variant
[ https://issues.apache.org/jira/browse/LANG-889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb resolved LANG-889.
-----------------------
Resolution: Invalid
Does not appear to be related to Apache Commons Lang
Try asking on the Spring user list
> If locale is "pt_pt", it's not a variant
> ----------------------------------------
>
> Key: LANG-889
> URL: https://issues.apache.org/jira/browse/LANG-889
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.*
> Affects Versions: 3.0
> Reporter: haiwei li
>
> You hava a spring MVC site, it's support multiple languages.
> <bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
> <property name="paramName" value="locale" />
> </bean>
>
> You can try url is http://xxx.com/controll/action?locale=pt_pt, it's think so "There is definitely a variant, and it is everything after the country"
> form code:
> org.springframework.util.StringUtils.parseLocaleString[659]
> if (parts.length >= 2) {
> // There is definitely a variant, and it is everything after the country
> // code sans the separator between the country code and the variant.
> int endIndexOfCountryCode = localeString.indexOf(country) + country.length();
> // Strip off any leading '_' and whitespace, what's left is the variant.
> variant = trimLeadingWhitespace(localeString.substring(endIndexOfCountryCode));
> if (variant.startsWith("_")) {
> variant = trimLeadingCharacter(variant, '_');
> }
> }
> return (language.length() > 0 ? new Locale(language, country, variant) : null);
> When locale is "pt_pt", it's result "pt_PT_pt", I think so it's not a variant.
> <a href="http://jakarta.apache.org/commons/lang/">Jakarta's Commons Lang</a>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira