Wednesday, August 17, 2022

How to add a language switcher to WordPress

Must Read

What is a language switcher?

If you wish to make your website more accessible and inviting for an international audience, the best way to do this is by making it multilingual. To do so, what you will require is a language switcher. A language switcher is a selector tool that allows the visitors to your website to choose a language for navigation from the language options you’ve provided.

Adding a language switcher to your website is beneficial in terms of scalability. It enhances the user experience by offering them the option to navigate comfortably in a familiar or native language.

Options for language switcher:

While language switchers are an excellent tool to have at your disposal, it is important to select one that offers good functionality and is fairly easy to use. Here is a list of tried and tested switchers for you to pick from:

  1. TranslatePress
  2. Polylang
  3. WPML
  4. Weglot
  5. MultilingualPress

These plugins offer a few options to add the language switcher to your website. You can display it as a widget, in the footer or the sidebar, as part of the main navigation menu, etc. They also provide multiple options to customize the switcher’s functionality, position, and look.

How to add a language switcher:

This section details the procedure you can follow to effortlessly add a language switcher to your WordPress website.

Step 1: How to install and activate the language switcher plugin

  1. Go to the WordPress dashboard and click on Plugins -> Add New.
  2. Search for the language switcher you want to install in the search bar (top right corner of the window).
  3. Install the language switcher by clicking on the Install Now button right next to your choice of the switcher.
  4. Once installed, activate the plugin.

Step 2: Add languages

  1. Back at the dashboard, click on Settings and select the language switcher you have chosen.
  2. Go to the license tab and add the license key provided under your account on the plugin website.
  3. The option to add the languages can be found under the plugin’s General Settings or its equivalent.
  4. Add the preferred languages for your website under the Add languages section.

Save your settings before moving on to the next stage.

Step 3: Additional language-related configuration

  1. You can choose the default language of your website.
  2. Depending on the plugin, you can display the names of the added Language (s) in the native script.
  3. You can also decide whether you want the name of the default language to be added to the URL as a subdirectory.

Depending on your choice of language switcher, there will be many more settings that you will have to configure. For example, whether you want to use Google Translate to translate the text on your website and so on automatically. Remember to save all the changes you make to the settings.

Step 4: Options to display the language switcher on your website

Each language switcher would have different ways you could display the language switcher. Here we will demonstrate some options with the help of the multilingual WordPress plugin and themes TranslatePress. TranslatePress offers three ways to add the language switcher to your website. You can do so by using a short code, adding it as a menu item, or floating language selector/ banner.

  1. To choose one of the three options, first, go to Settings -> TranslatePress -> General Settings.
  2. Under General Settings, navigate to find the Language Switcher section.
  3. TranslatePress allows you to pick from the three options simply by ticking the box next to the desired switcher to enable it.

Any language switcher would offer a few different ways to display the name of the Language or a way to identify them. The most commonly available options include the full name of the Language, the respective flag, or the language code. You could even select a combination of these options to display.

Step 5: How to add the language switcher to your WordPress website

Continuing with the example of TranslatePress, we will now illustrate how to add the language switcher to your WordPress website.

  1. Using shortcode to display the language switcher as a widget
  • From the WordPress dashboard navigation menu, click on Appearances -> Widgets.
  • From the Available Widget, drag and drop the text widget to wherever you want the switcher to be displayed, i.e., footer, sidebar, etc.
  • Add the code [language-switcher] to the text widget and give it a title, i.e., Language as an identifier for users.

 

  1. To display language switcher in the navigation menu of your WordPress website
  • From the WordPress dashboard, navigation menu, click on Appearances -> Menu.
  • Extend the Language Switcher tab in the left column and select all the languages you want to be displayed on your website.
  • Click on Add to Menu to add the switcher to your website.
  • All the Language items must be placed as sub-items under the Current Language tab to display languages in a drop-down menu.

 

  1. To create a floating language switcher
  • Enable this option from Setting -> TranslatePress -> General.
  • Choose the theme and the position you want it to be displayed on your website.

 

Finally, don’t forget to save all the changes you make for the switcher to appear on your website.

According to WP experts These steps should help you add a language switcher to your WordPress website with ease. With each language switcher plugin, you’ll have more customization options to play around with.

Once you enable translation, the international visitors to your website will have an easier time navigating, enhancing their overall user experience. Keep switching things up to figure out what works best for your website and users.

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -spot_img
Latest News

Custom display boxes come in a variety of types

Custom presentation boxes are an incredible method for communicating your image character. They can be made to any measure,...
- Advertisement -spot_img

More Articles Like This

- Advertisement -spot_img