[ 
https://issues.apache.org/jira/browse/SLING-5781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15352385#comment-15352385
 ] 

Konrad Windszus commented on SLING-5781:
----------------------------------------

Actually in the documentation it states the following:

bq. These language nodes have a jcr:language property naming the language of 
the resources. In the context of the JCR based ResourceBundleProvider this is 
of course expected to be the string value of respective Locale. The format may 
either be the format as described in Locale.toString or as described in RFC4646 
(both formats are also accepted in lower-case).

So actually both separators should be supported IMHO.

> [i18n] generating locale from a string is incorrect
> ---------------------------------------------------
>
>                 Key: SLING-5781
>                 URL: https://issues.apache.org/jira/browse/SLING-5781
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: i18n 2.4.6
>            Reporter: Ankit Agarwal
>
> As per sling document here 
> https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html
> parts of locale string are separated by hyphen ("-") like de-DE-MAC but in 
> JCRResourceBundleProvider while extracting locale from a String we are 
> separating parts with underscore ("_") as done here 
> https://github.com/apache/sling/blob/trunk/bundles/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/JcrResourceBundleProvider.java#L586
> Should this be change to separate string on "-" basis ?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to