 Andrey
WPML Supporter since 06/2013
Languages:
English (English )
Russian (Русский )
Timezone:
Europe/Kyiv (GMT+02:00)
|
- Does this mean I have to make new Tabs for the Danish products or only the Swedish?
Not necessarily, you can adjust existing ones.
- When I manually create new Swedish Tabs and give them the same title as in the Danish products, wil they then automaticaly get same IDs/Slugs as the Danish ones? I thought new tabs would always get new IDs/Slugs?
I just re-tested. Yes, you are right, it was like that before. Now, they always get new IDs/Slugs (taken from post ID).
- When the ID/Slugs are identical, can I then rename the Tabs, for the Swedish products after the ID/Slugs have been set?
The most important point is to keep the tab slug the same between the original and its translation. The tab's title can be different.
Basically, the steps are the same as above:
1. Create the tab in the original language (if you go with new tabs).
2. Translate the tab into the secondary language.
3. Manually adjust the tab slug in the translation so it matches the original tab’s slug.
4. Assign the tab to the product and test the result
(assuming the related custom fields are configured as described earlier).
|
 peterS-210
|
Hi Andrey
I think it works now 🙂
I can see that you already renamed the slugs of one of the tabs. So I renamed the other tab to match the danish ID/Slug.
I updated the custom fields settings so one tab will be translated and the other one will be copied (this tab is ingredients and does not need translation)
Then I did a change to a translated product in the original language and updated the translation, and then the two tabs very ready in the Swedish version 🙂
I translated a new product and now the tabs just work out of the box.
So I did not have to asign any tabs to any products, as you have written in step 4 in the latest procedure. It just works with renaming the slugs/IDs and updating the translation.
It seems to work now, even though I did not follow your instructions 100%. Do you see any potential issues or mistakes in the procedure I have described above?
Thank you
/Peter
|
 Andrey
WPML Supporter since 06/2013
Languages:
English (English )
Russian (Русский )
Timezone:
Europe/Kyiv (GMT+02:00)
|
Hi Peter,
I’m glad to hear it’s working — if it works, it works 🙂
There’s really no other required setup in this case, so I don’t see any potential issues.
So I did not have to asign any tabs to any products, as you have written in step 4 in the latest procedure. It just works with renaming the slugs/IDs and updating the translation
In this case, I likely missed a detail in how the WooCommerce Product Tabs plugin is configured on your site. You can safely ignore that step.
|
 peterS-210
|
Hi Andrey
We are close to resolve this ticket now 🙂
One hopefully final question. I have set the custom field _wpt_field_wpt-35337 to "COPY" because I would like to copy content from the Danish tab to the Swedish tab. But it seems to "jump back" to "TRANSLATE" after doing some product translations/syncs. Moving this back and forth triggers naturally some sync issues on the products. So questions is, why does it "jump back" to "TRANSLATE" after I set it to "COPY" and saved. I have seen this issue multiple times now.
Screenshot attached
/Peter
|
 Andrey
WPML Supporter since 06/2013
Languages:
English (English )
Russian (Русский )
Timezone:
Europe/Kyiv (GMT+02:00)
|
Hello Peter,
I suspect the plugin author has configured this field to be translatable by default, since that’s usually what most users expect. That could explain why the value appears to “jump” or change unexpectedly.
As a workaround, I recommend locking this field via a WPML configuration, so its value is always copied from the original language instead of being translated.
Please try adding the following configuration in
WPML → Settings → Custom XML Configuration:
<wpml-config>
<custom-fields>
<custom-field action="copy">_wpt_field_wpt-35337</custom-field>
</custom-fields>
</wpml-config>
I hope this helps.
|
 peterS-210
|
Hi Andrey
Now I have tested for some days, and it seems like the custom field is now locked to "COPY" after adding the code you provided.
For some of the products the custom field is missing after translation, but if I run the translation once more it shows up on the product - I just need to check all products for this field to be sure.
I can see that all the products are marked for resync shortly after translation. I guess this has something to do with the code forcing the field to be "COPY" - what do you think?
I can live with this "out-of-sync" status for the products, but du you see any problems with the products being out-of-sync constantly?
/Peter
|
 Andrey
WPML Supporter since 06/2013
Languages:
English (English )
Russian (Русский )
Timezone:
Europe/Kyiv (GMT+02:00)
|
Hello Peter,
I’m glad to hear that the custom field is now locked and working as expected.
I can see that all the products are marked for resync shortly after translation. I guess this has something to do with the code forcing the field to be "COPY" - what do you think?
Could you please upload a screenshot showing what you’re seeing? This will help me make sure I understand this correctly and give you a more accurate answer.
|
 peterS-210
|
Hi Andrey
Please see attached screenshot.
All these products have not been changed since translation but as you can see they are marked as "Resync needed". My guess is that this has something to do with the field we have now locked to "Copy" - but I don't know, it is just a guess.
/Peter
|
 Andrey
WPML Supporter since 06/2013
Languages:
English (English )
Russian (Русский )
Timezone:
Europe/Kyiv (GMT+02:00)
|
Hi Peter,
Thank you for the screenshot.
Yes, this indicates the translation needs to be updated because the original content has changed.
The existing translations will still work and will continue to be displayed on the site, so you can leave them as is if everything looks fine. However, if you notice something missing or outdated in the translation, you’ll need to either send it for translation or open the translation editor to complete it to sync the latest changes.
|
 peterS-210
|
Hi Andrey
Thank you very much for your support - I am really happy for your help 🙂
Best Regards
Peter
|