This thread is resolved. Here is a description of the problem and solution.
Problem:
The client wants to clean up the translation statuses of existing content before adding a fifth language to their multilingual website. They are looking for a way to bulk update the translation statuses without relying on additional plugins.
Solution:
1. We recommend bulk editing and saving the translated contents to resolve the issue. A plugin like Bulk Editor could be useful.
2. When making minor edits to the original content, use the "Minor Edit" checkbox in the WPML language options within the WordPress Editor to prevent the translation status from changing.
3. Avoid translating content with the WordPress Editor if the WPML Translation Editor is the defined method for translating that content, as manual edits could be overwritten.
4. If you prefer a programmatic solution, you can add the following code to your theme's
functions.php
file, but please ensure you back up your site and database first:
add_action( 'admin_init', 'save_all_posts_on_refresh' ); function save_all_posts_on_refresh() { global $pagenow; if ( $pagenow == 'edit.php' ) { $args = array( 'post_type' => array('page', 'post'), 'numberposts' => -1 ); $all_posts = get_posts( $args ); foreach ( $all_posts as $single_post ) { wp_update_post( $single_post ); } } }
After using this code, remember to remove it from the
functions.php
file.
5. WP All Import is not a solution for this issue as it requires an import of original products as a reference to connect the imported translations.
Please note that this solution might be irrelevant due to being outdated or not applicable to your case. If so, 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 with us.
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 3 replies, has 2 voices.
Last updated by 9 months, 4 weeks ago.
Assisted by: Andreas W..