You can easily change the configuration using the available options detailed below. Optionsīy default the language switcher will display languages names only. You can include a language switcher anywhere in your site by using the PHP template tag pll_the_languages(). Due to a WordPress limitation, to make it available, it is necessary to first add the navigation block with at least one of the blocks available by default in the list, then add the language switcher.įor example create a link => convert it to the language switcher. With Polylang Pro the Language Switcher can also be added as a block in the navigation block. To display the language metabox, click on the three dots action menu and select “Show more options” Click on the GIF to see how to display the Language Switcher options in the Full Site Editing 1.5 Language switcher in the navigation block Click on the GIF to expend it and see how to find and add the language switcher as a widget in the Full Site Editing Typing the first few letters should suffice to bring it up. To add it, simply click the “+” button to add a block and search for the language switcher. With Polylang Pro the language switcher is available as a block in the Full Site Editing. Refer to Options for the detail of what each option of the Language Switcher.ġ.4 Language switcher as a block in the FSE To do so simply search for “Language Switcher” in the search form of the block editor in your Appearance tab > Widgets sub-tab.Ĭlick on the icon of the block, it will add it to the main blocks list (central scroll zone) and open the block editor embedded view in witch you’ll find all the “Language Switcher” options. With Polylang Pro you have the possibility to add a language switcher in the new widget block editor introduced in WordPress 5.8. You can choose to display either the language name or its flag or both 1.3 Add a language switcher as a Block in the new widgets block editor Refer to Options for the detail of what each option of the Language Switcher. This option works with Polylang Pro for existing widgets only, it is no longer possible to add it. With Polylang you have the possibility to add our widget Language switcher, in the Appearance tab > Widgets sub-tab, by first adding a block “Legacy Widget” in which you then select the Polylang Language Switcher. Refer to Options for the detail of what each option of the Language Switcher does.ġ.2 Add a language switcher as a widget with legacy block If you don’t see the language switcher metabox, check that it is not disabled in the screen options (horizontal tab which can be unfolded as shown by bullet 3 in the “Menu” documentation). You can include the Polylang language switcher in your menu. Add a language switcher 1.1 Add a language switcher in a menu If there is no content in any language, then the language switcher does not appear at all. Note: To avoid 404 errors, the language switcher does not display a language on the front end if there is no published content (post or page) in that language. By default, if the current page is untranslated, the language switcher links to the front page in the corresponding language. The purpose of the language switcher is to create links to the translations of your current page. Displays language names and displays flags.Language switcher in the navigation block.Language switcher as a block in the FSE. Add a language switcher as a widget in the new block editor.Add a language switcher as a widget with legacy block.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |