This user has no favorite topics.
Favorite Forum Topics
Forum Topics Created
| Status |
Topic
|
Supporter | Voices | Posts | Freshness |
|---|---|---|---|---|---|
|
[wpml_language_selector_widget] language strings
Started by: Jörg Bröker
in: English Support
Problem: If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. Additionally, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. For further assistance, you can also visit our support forum at WPML Support Forum. |
|
2 | 3 | 1 year, 7 months ago | |
|
I want my media translations to be identical for "German" and "German (Austria)
Started by: Jörg Bröker
in: English Support
Problem: UPDATE wp_posts t JOIN ( SELECT trid, MIN(element_id) AS original_id, MAX(element_id) AS translated_id FROM ( SELECT trid, element_id FROM wp_icl_translations WHERE element_type = 'post_attachment' ) AS element_ids GROUP BY trid ) AS image_ids ON t.ID = image_ids.translated_id JOIN wp_posts o ON o.ID = image_ids.original_id SET t.post_content = o.post_content, t.post_excerpt = o.post_excerpt, t.post_title = o.post_title WHERE t.post_type = 'attachment'; UPDATE wp_postmeta t_meta JOIN ( SELECT trid, MIN(element_id) AS original_id, MAX(element_id) AS translated_id FROM ( SELECT trid, element_id FROM wp_icl_translations WHERE element_type = 'post_attachment' ) AS element_ids GROUP BY trid ) AS image_ids ON t_meta.post_id = image_ids.translated_id JOIN wp_postmeta o_meta ON o_meta.post_id = image_ids.original_id AND o_meta.meta_key = '_wp_attachment_image_alt' SET t_meta.meta_value = o_meta.meta_value WHERE t_meta.meta_key = '_wp_attachment_image_alt'; If Alt Texts are missing in "German (Austria)" translations, use this query to create and copy them: INSERT INTO wp_postmeta (post_id, meta_key, meta_value) SELECT translated_id, '_wp_attachment_image_alt', o_meta.meta_value FROM ( SELECT trid, MIN(element_id) AS original_id, MAX(element_id) AS translated_id FROM ( SELECT trid, element_id FROM wp_icl_translations WHERE element_type = 'post_attachment' ) AS element_ids GROUP BY trid ) AS image_ids JOIN wp_postmeta o_meta ON o_meta.post_id = image_ids.original_id AND o_meta.meta_key = '_wp_attachment_image_alt' LEFT JOIN wp_postmeta t_meta_existing ON t_meta_existing.post_id = image_ids.translated_id AND t_meta_existing.meta_key = '_wp_attachment_image_alt' WHERE t_meta_existing.meta_id IS NULL; If this solution does not resolve your issue or seems outdated, we 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 problem persists, please open a new support ticket. |
|
2 | 5 | 1 year, 11 months ago |