3

I´m working in a multi country website ( resolved with locales ) with products, and each product will show information for each country and the product image could change from one country to another, but the picture will usually be the same. Because the image can change for each locale, i check it like a Translatable field, but i realize that the client will have to fill the image field with the same image for each of the 4 languages, resulting in extra work to enter each product... so my question is:

Is there a way to assign the image in the default locale, and the others locales taking this image as default, except that you specify an image for that language specifically?

Thanks! Sebastian

2

One way would be to create two Asset fields. One is the default field and one is the field which is translatable into each locale.

You could then steer the two fields via conditional logic: If no image is present in the default field, switch to the localised field.

You could add a light switch field which disables the localized field for further safety & usability.

  • Yes, it´s a good approach. The default field always will have a image ( since it´s a required field ), and the default locale will take the image from there, for the others locales will check if specific image exist and shows it, if not, shows the default image instead. Maybe a simpler way would be filter entry locales ( thinking out loud :) ), like this example: craftcms.stackexchange.com/questions/11958/… But i´m doing something wrong this example don´t works for me... – Sebastián. Feb 3 '16 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.