Dear Magnolians, dear Jan

We're using jsonfn to generate a JSON with product data. Assume we have a 
product node with a title and description property, all with i18n set to true, 
so in JCR we would in fact have something like:

- productX
    - title: Super Product
    - title_de: Super-Produkt
    - title_fr: Super-Produit
    - description: A real must-have!
    - description_de: Ein Muss für alle!
    - description_fr: Mon français n'est pas assez bien!

What we need now, is a language-specific JSON which delivers the data in the 
main property names, not the ones with the language extensions, so:

EN productX:
{
    "title": "Super Product",
    "description": "A real must-have!"
}

DE product X:
{
    "title": "Super-Produkt",
    "description": "Ein Muss für alle!"
}

and so on. Can anyone tell me how to do this with jsonfn? I tried with 
.wrapForI18n() and .add("title","description"), but so far, no matter what I've 
tried, I always got the whole enchilada, so
{
    "title": "Super Product",
    "description": "A real must-have!"
    "title_de": "Super-Produkt",
    "description_de": "Ein Muss für alle!",
    "title_fr": "Super-Produit",
    "description_fr": "Mon français n'est pas assez bien!"
}

Thanks for the insight!

-will

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=b5041414-a1d0-467a-97d7-ef7aa0e578fc


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <user-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------

Reply via email to