This thread is resolved. Here is a description of the problem and solution.
Problem:
You are developing a site using WPML and when uploading a new product in English and translating it to Arabic, you are prompted to translate the image titles, which you find unnecessary and time-consuming.
Solution:
We recommend two possible workarounds to avoid translating image titles:
1) Install the WPML Media Translation Add-On. This add-on automatically hides the media items in the editor by default.
2) If you prefer a manual adjustment, edit the function in your installation at
wp-content/plugins/woocommerce-multilingual/inc/class-wcml-tp-support.php
→
WCML_TP_Support::append_images_to_translation_package
. When Media Translation is not enabled, this condition runs:
if ( ! defined( 'WPML_MEDIA_VERSION' ) ) {<br /> add_filter( 'wpml_tm_translation_job_data', array( $this, 'append_images_to_translation_package' ), 10, 2 );<br /> add_action( 'wpml_translation_job_saved', array( $this, 'save_images_translations' ), 10, 3 );<br />}To bypass this behavior, add the following constant to your wp-config.php file:
define( 'WPML_MEDIA_VERSION', '666' );
This will prevent the additional media data from being added to the translation package.
Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket at WPML support forum.
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 topic contains 17 replies, has 1 voice.
Last updated by 5 months, 4 weeks ago.
Assisted by: Marcel.