Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Alejandro 1 year, 7 months ago.

Assigned support staff: Alejandro.

Author Posts
December 21, 2020 at 3:31 pm #7710845

jessicaM-2

I am trying to:
I have not yet translated all my products to all languages. I have chosen to 'Translatable - use translation if available or fallback to default language' on Products. It works on the products but then when a visitor filter by colour on the translated products are visible. I would also the English version of the not yet translated ones to be visibale.

Link to a page where the issue can be seen: hidden link

I expected to see: hidden link

Instead, I got: very few products when filter by attribute.

December 21, 2020 at 4:06 pm #7711127

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hello!

This is actually expected and let me explain you why.

Whenever you set to use the fallback version, we just "remove" the language filter and modify the URL to show it as if it was a different URL.

However, while this is ok for a simple loop, filtering content will never work because the product doesn't really exist and the filters are filtering by an attribute in a specific language which of course will never return a value if the actual product doesn't exist in the database.

A solution for this problem is to go to WPML > Settings > Post Type translation > Product > Set to "translatable - only show translated items" and then duplicate the product instead.

this will make them appear in the filters without having to translate them: https://wpml.org/documentation/translating-your-contents/displaying-untranslated-content-on-pages-in-secondary-languages/#duplicating-content

you can even duplicate them in bulk by going to WPML > Translation Management and selecting "duplicate" in the last step of the "translaton dashboard" tab.

Try it out and see the difference.

Regards.