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 thread is resolved. Here is a description of the problem and solution.

Problem:

How can I obtain the job and after that the fields and fields information?

Solution:

With our API there is no solution for this specific request. A custom code would be needed to be written in order to achieve that.

Relevant Documentation:

In any case, here are the links to our API Hooks. https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by Itamar 1 year, 5 months ago.

Assigned support staff: Itamar.

Author Posts
May 21, 2018 at 1:55 pm #2201706

Ruben Arroyo Ceruelo

Hi.

I'm developing a plugin to manage some translations, I already have it working with "Translation Management + String Translator", but now I will to improve without this plugins.

Basically, I load all posts and after I check if need translations (this is working), but after that I need to know / create the Job to make a translation for each post and after fill all fields.

How can I obtain the job and after that the fields and fields information?

I don't found exactly this in the API.

Thanks for help.

Regards.

May 22, 2018 at 5:11 pm #2210698

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I'll try to help you with that, but I'm not sure that we have API for this.

If I understand you correctly then after you check and find a post that needs a translation you want a Translation Job to be created automatically for it.
Is the above description correct?

I'm not sure so much about the rest of your request.
You write: "How can I obtain the job and after that the fields and fields information?"
Could you elaborate on which fields you are referring?
Can you share with me the code that you are working on?
This way I might be able to help you better.

Regards,
Itamar.

May 22, 2018 at 6:26 pm #2211276

Ruben Arroyo Ceruelo

Hi.

First of all, sorry if I explain bad or with wrong sentences.

Second, here the repository for the plugin: hidden link (yes, it currently use google translator, the idea is improve this with other platforms, and yes, I know that WPML have a similar function).

If you check the code, you will see that not all (almost nothing) is working with the "API", instead use direct the required classes and functions.

I'm not only need the translation job although need obtain all fields (or their content) and save it in the corresponding translation job.

This fields commonly are:
- Title
- Description

And in some cases, the meta that themes or plugins add.

I hope this explain more my answer.

Thanks.

May 23, 2018 at 5:54 pm #2217416

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I've sent this information to our second tier supporter and am waiting for their reply on this issue.

I'll keep you updated here once I have their comment on this.

Regards,
Itamar.

May 24, 2018 at 7:30 am #2220091

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I've discussed this issue with two of my superiors.
They also think that what you are trying to achieve cannot be achieved only with our API.
You would need to dig into the WPML's code to understand how things are going on there to a achieve what you need.
Unfortunately, it seems that for now, you need custom programming work which is beyond the scope of our support. At this point I would suggest you consider contacting one of our certified partners from this link:
http://wpml.org/documentation/support/wpml-contractors/

Before doing so, please have a look also here:
http://wpml.org/documentation/support/wpml-contractors/guidelines-for-people-looking-for-consulting-help/

You will probably get the custom assistance you need to get on with your project.

Regards,
Itamar.

May 24, 2018 at 7:42 am #2220100

Ruben Arroyo Ceruelo

Hi.

Thanks for support.

I expected to learn (more) how WPML is programmed, but I have no time for now and is not a "super ultra required" function, I can pass (I hope) with Translation Management and String plugin.

If I have time in future then i'll try to do this.

Again, thanks for support.

Best regards.

May 24, 2018 at 8:06 am #2220274

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

You are welcome.

Regards,
Itamar.