Skip Navigation

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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Mateus Getulio 10 months, 3 weeks ago.

Assisted by: Mateus Getulio.

Author Posts
April 7, 2024 at 8:47 am #15491329

ronnyK-4

I imported some german images to my site that has default lanugage english.
I wold like the media to be german to spare a lot of work.

I tried with
UPDATE prefix_translations t
JOIN prefix_posts p ON p.ID = t.element_id
SET t.language_code = 'de'
WHERE p.post_type = 'attachment'
AND p.post_date_gmt < '2023-01-01';

but gives an error on the trid_lang index about duplicate values

April 8, 2024 at 11:04 am #15493780

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Thank you for contacting us.

Can you please check if this workaround suffices for you?

- Please make a full backup of the site just in case
- Remove the media you imported
- Temporarily change the main language of the site to German inside WPML -> Languages
- Import the media again and check if they belong to the German language now
- Go back to WPML -> Languages and return the main language to English

Please give it a try and let us know if it works as expected.

Mateus

The topic ‘[Closed] Change Media default language’ is closed to new replies.