Background of the issue:
I am building a Divi site in English and French. The design requires a language switcher that shows a link as 'EN' when the site is viewed in French or 'FR' when the site is viewed in English, instead of using flags.
Symptoms:
I could not find the relevant documentation for creating a custom language switcher without using flags.
Questions:
Is it possible to create a language switcher in Divi that shows 'EN' or 'FR' instead of flags?
Could you please direct me to the relevant documentation for creating a custom language switcher in WPML?
Thank you for contacting WPML Support. You should be able to achieve it 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 language codes (EN, FR, 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.
If you need to add language switcher other than site menus, you can add code/shortcode to that position, please go to WPML >> Languages > Custom language switcher and customise it according to your needs then please use the below shortcode in header template to display language switcher on a specific position: