Contentful logo

Contentful Community

Setting up content preview, with a localized slug field

#1

I’m trying to setup a content preview link (in the Contentful editor) for a model that is localized. The preview urls should point to different subdomains, so for each language will need separate content previews. The slug of the model is localized and in order to get the correct slug, I need to get hold of the field with a specified locale.
I can’t seem to find any information in the docs of how to retrieve a specific version with the {string variables syntax}.

Anyone that can point me in the right direction of how to get hold of localized value from a field?
{entry.fields.slug} returns the default language, in my case en-US as expected. But how do I retrieve the Swedish locale of the slug, my first guess would be something like: {entry.fields.slug[sv-SE]}, but no luck.

0 Likes