I have two language versions for each of my pages using Polylang plugin. There's a language switcher on every page. But somehow I created two posts not connected to each other (first two in the list). How can I interconnect them so language switcher works properly?
I'll use as example two pages:
Hello (en) and
- Click "Edit" in page
Hello(doesn't really matter which one)
- At the right sidebar there will be the language of the current page (English) and a list of flags of other languages with a plus symbol (to create another page) and a text input beside it:
- In this text input, start typing the page title of the translated page (on our example,
Bonjour). The input will suggest the other page, just click on it and save, it will link each other.
pll_save_term_translations Defines which terms are translations of each other Usage:
‘$arr’ => (required) associative array of translations with language code as key and term id as value
You have to set the language for all existing categories and post tags, otherwise they won’t be displayed in the autocomplete input field.