Have a look at: 
https://github.com/auniverseaway/slick-2/tree/master/ui.apps/src/main/resources/jcr_root/libs/languages

I can verify this works on pure Sling 8.

Let me know if you have any additional questions.

> On Apr 26, 2017, at 3:23 PM, Correia <carlos.manuel.corr...@celfocus.com> 
> wrote:
> 
> Hi all,
> 
> I'm trying to use the Internationalization Support based inJSON as described
> in Sling example:
> https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html
> 
> I'm having trouble creating the JSON. Can anyone provide an example?
> 
> My working attenpt:
> {
>    "jcr:primaryType": "nt:folder",
>    "jcr:mixinTypes": ["mix:language"],
>    "jcr:language": "en",
>    "hello": {
>        "jcr:primaryType": "sling:MessageEntry",
>        "sling:message": "Hello"
>    },
>    "hello2": {
>        "jcr:primaryType": "sling:MessageEntry",
>        "sling:message": "Hello 2"
>    }
> }
> 
> But Î want to use as key:value.
> 
> Using the page example should be something like:
> {
>    "jcr:primaryType": "nt:file",
>    "jcr:mixinTypes": "[mix:language]",
>    "jcr:language": "en",
>    "jcr:content": {
>        "jcr:primaryType": "nt:resource",
>        "jcr:data": {
>            "hello": "Hello",
>            "hello2": "Hello 2"
>        }
>    }
> }
> 
> Issues:
> 1) type "nt:file" dont allow me to define jcr:language ( No matching
> property definition: jcr:language = en)
> 2) Missing some defenition in jcr:data (No matching property definition:
> jcr:data)
> 
> PS: I'm using pure Sling. No AEM nor CQ.
> 
> Thanks,
> Carlos Correia
> 
> 
> 
> --
> View this message in context: 
> http://apache-sling.73963.n3.nabble.com/Sling-JSON-i18n-tp4072998.html
> Sent from the Sling - Users mailing list archive at Nabble.com.

Reply via email to