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 thread is resolved. Here is a description of the problem and solution.

Problem:Chinese Flag no longer displays

Solution:Deactivate WPML plugin, delete it , go to https://wpml.org/account/downloads/ and download a fresh version of WPML 4.0.8 and install it manually

to do a manual update please follow these steps:

1. Backup your database – see for example: http://wordpress.org/extend/plugins/wp-db-backup/

2. Deactivate the existing WPML plugin and add-ons.

3. Delete the plugin files – this does not delete your translations. You will simply delete the plugin files from you "wp-content/plugins" folder NOT the database records.

4. Download the updated plugins from our servers and upload them to the plugin directory.

5. Activate the WPML plugin and add-ons.

Relevant Documentation:

This topic contains 8 replies, has 5 voices.

Last updated by unaD 11 months, 3 weeks ago.

Assigned support staff: Bobby.

Author Posts
October 23, 2018 at 6:26 pm #2843794

Aaron

I updated to the latest version of WPML today, and since the update, the Chinese flag no longer appears in my language switcher. It displays a broken image, where the flag should be, and instead of showing the name of the language in the native language (简体中文"), it displays "zh-hans简体中文". Please see attached image.

It is displayed this way in the Menu Language Switcher, Widget Language Switcher, as well as in the backend.

How can I change it back to how it originally was before the update?

It should display the flag icon with 简体中文" beside it.

Thanks!

October 24, 2018 at 4:37 am #2844860

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

please go to WPML->languages-> edit languages and share a screenshot with me of that page if possible

were you using a custom image before the update ? any updates will remove custom images uploaded using FTP.

October 24, 2018 at 10:30 am #2845795

jurgenR

exactly the same issue as described happened to me. Chinese flag (zh-hans) disappears after latest update.’

October 24, 2018 at 1:16 pm #2846406

Aaron

It was using the default flag image, I didn't upload custom flag icons.

Screenshot of Edit Languages section is below.

October 24, 2018 at 5:45 pm #2847456

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

please try the following and let me know your results

Deactivate WPML plugin, delete it , go to https://wpml.org/account/downloads/ and download a fresh version of WPML 4.0.8 and install it manually

to do a manual update please follow these steps:

1. Backup your database – see for example: http://wordpress.org/extend/plugins/wp-db-backup/

2. Deactivate the existing WPML plugin and add-ons.

3. Delete the plugin files – this does not delete your translations. You will simply delete the plugin files from you "wp-content/plugins" folder NOT the database records.

4. Download the updated plugins from our servers and upload them to the plugin directory.

5. Activate the WPML plugin and add-ons.

let me know your results , i have test this on a test environment and it worked as expected with the flag showing.

October 25, 2018 at 12:43 pm #2849771

jurgenR

Solution worked for me. Thank you

October 26, 2018 at 6:14 pm #2853960

Aaron

My issue is resolved now. Thank you!

December 11, 2018 at 6:21 pm #2989925

barryR-5

I have the identical issue. This seems like it is a bug that needs fixing.

August 5, 2019 at 3:17 pm #4341621

unaD

this is still a bug and it's down to the following;

Line 530 in /plugins/sitepress-multilingual-cms/menu/edit-languages.php

// Update flag table.
$this->update_flag($data['code'], $data['flag'], $from_template);

This is called if you update the table at /wp-admin/admin.php?page=sitepress-multilingual-cms%2Fmenu%2Flanguages.php&trop=1

What it does is sets the Chinese flag to zh-hans.png rather than zh.png.

A quick fix is to update the "wp_icl_flags" table, setting language code "zh-hans" to zh.png, then clear your cache as the get_flag method of WPML_Flags caches them. You can clear cache at /wp-admin/admin.php?page=sitepress-multilingual-cms%2Fmenu%2Ftroubleshooting.php by clicking "Clear the Cache in WPML"

You're welcome 🙂