Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client needs to convert country names to country abbreviations (e.g., DE, EN) in a WPML language switcher without using flags.
Solution:
If you're experiencing this, we recommend you try the following steps:
1. Navigate to WPML >> Languages page.
2. Click on the Edit Languages link.
3. Enter the country codes (DE, EN, etc.) in the Translation text boxes.
4. Click the Save button.
5. Click on the Pencil icon to open the “Language Switcher Settings”, uncheck the “Flag” option, enable the “Native language name” option, and then click the Save button.
6. Clear all sorts of site/server/CDN cache.

This solution might be irrelevant if it's outdated or not applicable to your case. 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 at WPML support forum.

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.

Tagged: 

This topic contains 1 reply, has 0 voices.

Last updated by Noman 2 months ago.

Assisted by: Noman.

Author Posts
March 5, 2025 at 12:13 am #16776277

simonL-29

Background of the issue:
I am working on a site under development and trying to convert country names to country abbreviations (DE, EN, etc.) without using flags.

Symptoms:
No specific issue or error message mentioned.

Questions:
Is there a way to convert country names to country abbreviations without flags?

March 5, 2025 at 5:37 am #16776533

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. You can customise the language names on language switcher by following the below steps:

1. Go to the WPML >> Languages page.
2. Click on the Edit Languages link as you can see in the attached screenshot.
3. Add country codes (DE, EN, etc.) in Translation text boxes as you can see in the attached screenshot.
4. Press the Save button.
5. Click on the Pencil icon to open up the “Language Switcher Settings” and uncheck the “Flag” option and enable the “Native language name” option and press the Save button. (Screenshot attached)
6. Clear all sorts of site/server/CDN cache.

Please let me know if this resolves the issue or if you need further assistance with this issue.

Thank you

Edit languages - Step 1.jpg
Add country code in Translation text boxes.jpg
Edit language switcher settings 1.jpg
Edit menu language switcher 2.jpg