Hi Waqar! I've installed WPML on a website. However i run into some problems, both concerning views.
First problem. I've created a post type called products. There are 60 product in the original language. I translated 2 into English. However, i see all products (linking to URL's with EN in it). I would expect only the 2 translated.
Second problem. We have a repeatable field group within the post type products. It's called features. Features consist of two fields. An image field and a text fields. I've set the text field to be translated, and the image field to be copied from original. Now, when i create an English copy of the product, the features are created (as expected), but in the frontend it shows 'no posts'. Also the text is holding my translation (given during copy) but the image field is empty (i would expect this to show the value from the original post).
Hi Waqar,
Just so i can update my client; is there any news on the above issue?
Thanks a lot,
Marc
Hi Marc,
Thank you for waiting.
During testing on my website, with a similar Toolset and WPML set up, I noticed the following points:
1. When using post-relationships or repeatable field groups, it is important that the "Translatable - use translation if available or fallback to default language" option is selected for the parent post type ( instead of the "Translatable - only show translated items" option)
You'll find this option at WP Admin -> WPML -> Settings -> Post Types Translation.
Screenshot: hidden link
Note: you'll also see a warning about this on the single produce edit screen.
( screenshot: hidden link )
As for the "Copy" option for the custom fields, you'll need to update the original post in the primary language once, for the fields to be copied over.
Here are steps that worked on my test website:
1. I create a product in the primary language and filled all the fields and then saved the product.
2. I created a translation copy of the product in the secondary language.
3. I returned to the edit screen of the product in the primary language and clicked the "Update" button.
After that, when I checked the product pages in both languages on the front-end, the custom field values were properly showing.
I'll recommend testing the same for a new product and for any existing product where the existing features are not showing, you can translate that product again, using the same steps.
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
My issue is resolved now. Thank you!