Polylang Elementor

  



Polylang and elementor problem Hello, I am currently translating a website from English to French. English is the default language, there are currently no french posts or pages so im creating them. I use Elementor, Polylang and Polylang Connect for Elementor, all free versions. Marshall Reyher says. November 9, 2020 at 7:41 pm. Description Connect the Polylang multilingual plugin with Elementor Page Builder: This plugin will make Elementor and Polylang show the correct language templates, especially with Elementor Pro Theme Builder. Plus: native Polylang Language Switcher Elementor widget, new Dynamic Tags, and Polylang links added to the Elementor Finder feature. Features Shows the correct Template (for different.

Elementor has crossed all boundaries and borders, reaching WordPress users around the globe. It’s available in over 50 languages, offers complete RTL support, compatible with translation plugins like WPML and Polylang.

1. Add a language switcher
1.1 Add a language switcher in the menus
1.2 Add a language switcher as a widget
1.3 Add a language switcher anywhere
2. Options
2.1 Displays as dropdown
2.2 Displays language names and displays flags
2.3 Force link to front page
2.4 Hide the current language
2.5 Hide languages with no translation
3. Customizing language names
4. Customizing flags
4.1 Use a flag from the predefined list
4.2 Use a custom flag
5. Order of languages

The purpose of the language switcher is to create links to the translations of your current page. By default, if the current page is untranslated, the language switcher links to the front page in the corresponding language.

Note: To avoid 404 errors, Polylang does not display a language on frontend if there is no published content (post or page) in that language. If there is no content in any language, then the language switcher does not appear at all.

1. Add a language switcher

1.1 Add a language switcher in the menus

Polylang Elementor

You can include the Polylang language switcher in your menu. If you don’t see the language switcher metabox, check that it is not disabled in the screen options.

1.2 Add a language switcher as a widget

Polylang provides a widget to display the language switcher.

1.3 Add a language switcher anywhere

You can include a language switcher anywhere in your site by using the PHP template tag pll_the_languages().

2. Options

By default the language switcher will display languages names only. You can easily change the configuration thanks to the available options.

2.1 Displays as dropdown

If you choose this option for the widget, it is not possible to display flags due to limitations of the html language. It is possible to work around this limitation with javascript (not provided by Polylang). There is no such limitation when using this option in the menu.

Elementor

2.2 Displays language names, displays flags

Polylang connect for elementor not working

Polylang Elementor

In the example below (with the Twenty Twelve theme), you can see the result when both settings have been checked for the menus and for the widget.

2.3 Forces link to front page

You have the possibility to always link to the front page in the corresponding language even if the current page is translated.

Polylang connect for elementor not workingPolylang connect for elementor not working

2.4 Hide the current language

Choose this option to never display the current language. The example below displays what could be seen on the French front page.

Polylang Et Elementor

2.5 Hide languages with no translation

If, for example, the current English post is not translated in Spanish, the language switcher doesn’t display any link for Spanish.

3. Customizing language names

You can change the language name by modifying the full name of the language.

4. Customizing flags

4.1 Use a flag from the predefined list

You can choose your language flag among all the flags when creating or editing a language. This flag is used on both frontend and admin sides.

4.2 Use a custom flag

It is possible to use your own images as flags. You have to use PNG or JPG files and name them with the WordPress locale. For example, en_GB.png. Then upload this file in the /wp-content/polylang/ directory (create the directory if it does not exist). Don’t use the /polylang/flags/ directory as your file would be removed when automatically updating the plugin.

Meaning

Once the custom flag is uploaded, go in Languages > Settings > URL modifications module then click on save changes. Note that your custom flags are not used on admin side.

5. Order of languages

You can choose the order of the languages in the language switcher when creating or editing a language.