Skip Navigation

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

Problem:
The client is trying to place a language switcher in their theme using abbreviations for languages (EN, FR, ES, etc.) without flags, and is planning to switch to the Avada theme and place the switcher in the navigation.
Solution:
If you're trying to integrate a language switcher with language abbreviations into your theme, we recommend using PHP to display it anywhere on your site. This will require adding code to your theme. If you don't want to add it directly to the menu as shown in our documentation, you can follow our guide on Adding Language Switchers using PHP and Shortcodes.

To set the language names to show as abbreviated versions, you can follow the steps provided by my colleague in this forum post: Abbreviate Languages on the Switcher.

If this solution doesn't seem relevant to your situation, please feel free to open a new support ticket in our 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 2 voices.

Last updated by Mihai Apetrei 10 months, 2 weeks ago.

Assisted by: Mihai Apetrei.

Author Posts
January 10, 2024 at 12:12 am #15166858

jasonD-27

Tell us what you are trying to do?
I'm trying to place a language switcher into my theme but using abbreviations for English, French, Spanish, etc. instead of the complete word. So EN, FR, ES and so on. No flags. Currently using Elementor but about to change the theme to Avada and placing the switcher in the navigation at the end instead. Or so I hope.

Is there any documentation that you are following?
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/

Is there a similar example that we can see?
hidden link

What is the link to your site?
hidden link

January 12, 2024 at 6:51 am #15177276

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there.

You can use PHP to display a language switcher anywhere you want on the site and it will need to be added to the theme's code in case you don't want to simply add it to the menu like it is shown in the documentation that you shared (https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/).

We have some amazing documentation here for doing that:
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/adding-language-switchers-using-php-and-shortcodes/

To set the language name to show the abbreviated version, just do what my colleague recommended here:
https://wpml.org/forums/topic/abbreviate-languages-on-the-switcher/

I hope that you will find this information helpful 🙂

Kind regards,
Mihai Apetrei