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.

Our next available supporter will start replying to tickets in about 5.65 hours from now. Thank you for your understanding.

This topic contains 8 replies, has 2 voices.

Last updated by Puntorosso 2 years, 3 months ago.

Assigned support staff: Bigul.

Author Posts
May 28, 2018 at 1:10 am #2236176

Puntorosso

Hi,
we have a site with 5 languages: english (as main language), german, italian, spanish, swiss.

Normally we start writing the english post, then translate to german, italian and spanish through the WPML Translation Management.

Being german and swiss almost the same, we switch manually to the german post and duplicate it.

While it works, I wonder if it would be possible to "force" WPML to automatic duplicate it every time we publish the german translation.

Thanks

Best

May 31, 2018 at 4:13 pm #2257670

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve these issues. Sorry for the late response due to a large number of requests, it is not usual here.

You can use *wpml_admin_make_post_duplicates* API for this purpose. It will allow to auto-duplicate the post while publishing a post. Please check the following documentation for more details.

https://wpml.org/wpml-hook/wpml_admin_make_post_duplicates/

You can ICL_LANGUAGE_CODE constant for detecting the preferred language while auto duplicating the post.

To help you faster, I've enabled debug information for this support ticket. Please see this link for how to get this information from your site and give it to us: http://wpml.org/faq/provide-debug-information-faster-support/

--
Thanks!

Bigul

May 31, 2018 at 4:49 pm #2257724

Puntorosso

Hi,

Thank you for the link

I was reading the instructions but it's now quiet clear to me how to set to which language it should be translated and assign this language to the duplicated post.

Any help is really appreciated.

Best

June 1, 2018 at 3:37 pm #2261976

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the updates. I have checked about this with our developers. Sorry to inform you that we limitations here. Because it is a customization of the default WPML features and needs to extend *wpml_admin_make_post_duplicates* API by writing special codes for the following. So which is beyond the limits of our support.

a) Detects when we are saving a German translation
b) Check there isn't already a Swiss translation
c) Duplicate the post only to Swiss

At this point, I would suggest you consider contacting one of our certified partners from this link: http://wpml.org/documentation/support/wpml-contractors/

You will get the custom assistance you need to get on with your project. Before doing so please have a look also here: http://wpml.org/documentation/support/wpml-contractors/guidelines-for-people-looking-for-consulting-help/

Thank you for the understanding.

--
Thanks!

Bigul

June 2, 2018 at 12:26 am #2263110

Puntorosso

Ok I get your point about the support limit, no problem.

Still there is something which is not clear in the way WPML handle the duplicating procedure, when you are using the Translator Editor ( at least with Divi).

As en example let's take a site with 3 languages (english, german, swiss), curated by an english Editor and a german Translator:

- Editor create a post in english.
- Translator start the German translation.
- The Translation Editor window open automatically.
- Translator fill all german fields.
- Translator "Save and Close" the Translation Editor window.
- WPML go back automatically to the english language.

Now, how can Translator duplicate the german post to swiss?
If Translator change language, using the flags dropdown on the top admin bar, it get this message:

"Warning: You are trying to edit a translation using the standard WordPress editor but your site is configured to use the WPML Translation Editor."

Under these circumstances he can only duplicate the english version.

I hope I could describe the problem better.

Best

June 4, 2018 at 2:49 pm #2269691

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the detailed feedback. This is an expected workflow when we are translating the posts/pages via WPML Translation Editor. As a workaround please try following steps and let me know your feedback.

1) Visit WPML>>Translation Management and choose *Multilingual Content Setup* tab
2) Scroll down to *How to translate posts and pages* section
3) Choose *Create translations manually* option(temporarily) and save the changes
4) Open a German post for edit and duplicate it to Swiss
5) You can switch back to *Use the translation editor* option after duplicating the German posts to Swiss

--
Thanks!

Bigul

June 4, 2018 at 2:53 pm #2269697

Puntorosso

Hi,

That's how we do now, but it needs one admin to be involved every time an editor or translator have done a new job.

Not really a solution...

Any other idea?

Thanks
Best

June 5, 2018 at 3:08 pm #2276066

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the feedback. I have checked about this with our team again. Without any code customization, there are limitations to achieve the functionalities you are looking for. WPML doesn't have an automatic feature for post/page duplication. But we can duplicate the default language posts using *wpml_admin_make_post_duplicates* API. Without code customization now we can only duplicate the Post to secondary language from Post Edit Screen or from Translation Dashboard(but this duplication is only possible from default language to secondary languages).

As I mentioned before it required a lot of code customization and you can contact WPML contractors for this purpose. Please check the following links for more details. Thank you for the understanding.

http://wpml.org/documentation/support/wpml-contractors/

http://wpml.org/documentation/support/wpml-contractors/guidelines-for-people-looking-for-consulting-help/

--
Thanks!

Bigul

June 5, 2018 at 3:57 pm #2276258

Puntorosso

Well in this case let us leave it like it is.

I still strongly believe this is a mistake in the workflow design.

Even if not automatically, an editor should have at least the possibility to duplicate a post without having to contact an admin.

Thanks

Best