I have 4 languages on my site, and 50 posts per language. In each of the 200 posts there is a custom field with the current value
Monday
Now I would like to update this custom field for my other languages (German, French, Spanish) with their respective translations of the word 'Monday'. So for the 50 German posts, the current value 'Monday' would be updated to
Montag
For the 50 French posts the custom field value would become
Lundi
And, last not least, for the 50 Spanish posts, the custom field value needs to be
Lunes
Now, instead of opening 150 tabs in my browser and manually update the custom field values via WP Admin, I'd like to run a MySQL query for each language to bulk update the values.
The "logic" of the query to update my German posts' custom field value would look something like that:
UPDATE 'wp_postmeta'
SET 'meta_value' = 'Montag'
WHERE 'meta_value' = 'Monday'
AND
FROM TABLE 'wp_icl_locale_map' WHERE 'code' = 'de'
This is not working due to syntax errors and I'm not a MySQL expert.