Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 6 replies, has 2 voices.

Last updated by Long Nguyen 3 years, 3 months ago.

Assisted by: Long Nguyen.

Author Posts
November 30, 2022 at 5:30 am #12559743

Florian

Hi,
we would like to add the target language as a suffix to the xliff filename. Is it possible to get a new filter for that in WPML_TM_Xliff_Frontend::get_xliff_archive, so we can manipulate the name generated with $archive->addFile($xliff_file, get_bloginfo('name') . '-translation-job-' . $job_id . '.xliff');

Could we also have an additional hook in WPML_TM_Xliff_Writer::get_translation_unit_data so we can manipulate the return data '$translation_unit' for example for removing the target

December 2, 2022 at 9:43 am #12577273

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English ) Vietnamese (Vietnamese )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi there,

Thank you for contacting WPML support and for your feedback.

Currently, there are no filter hooks to do those questions. It could be feature requests for the development team. Before sending the requests, can I have a question?
- It is understandable that adding the language source and target to the file name will be easier to read and classify.
- But for the second point, can you please let me know why you want to remove the target element in the XLIFF file? It is in a standard structure of an XLIFF file which you can read here hidden link
There could be some unexpected issues if remove this element.

Look forward to your reply.

Thanks

December 5, 2022 at 8:11 am #12588835

Florian

Hi Long,

thank you for your reply. Regarding the questing removing the target element:
if we look at the AppTree hidden link we will see that "target" has a question mark, which means it should have an occurrence of zero or one. So removing the target will not break the schema. In our case, the customer would need it to the translations in Trados, you can also check in this introduction video the the target is not present there hidden link

December 5, 2022 at 9:37 am #12589401

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English ) Vietnamese (Vietnamese )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thank you for the feedback.

I'm discussing those points with the development team to consider supporting filter hooks to modify the xliff file name and translation unit data. I will let you know if I have any news to share.

Thanks

December 6, 2022 at 4:54 am #12595941

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English ) Vietnamese (Vietnamese )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

The feature request is submitted. I will inform you of the status of the approval as soon as I have news.

Thank you and have a good day.

December 7, 2022 at 12:15 pm #12606571

Florian

Thank you very much!

December 17, 2022 at 3:15 am #12667697

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English ) Vietnamese (Vietnamese )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Our developers have created a backlog entry for the feature requests but for the moment there is no priority in this. We will increase the priority if we get more users asking for the same feature.

Thanks for your understanding and have a nice day.