icontriada.blogg.se

Multisite language switcher
Multisite language switcher







multisite language switcher

You could store a language code in the cookie and retrieve it, storing it in the variable $wpse189348_lang. There are various ways to handle cookies in WordPress.

multisite language switcher

Based on the preferred language redirect the user either to the greek or english site.If there is no cookie, detect the browser language to see what the user's preferred language is.

multisite language switcher

Read a cookie to see the user's preferred language.I tried using WPML but it assumes that different languages go to the same wp installation using vhosts and at the moment the mapping of posts and menus is not needed.įrom your question I gather that you want three things: Ideally I want a language switcher that recognizes the browser language and redirects accordingly and stores the language in cookie and if the user selects the other site to store that selection.įor example if I visit the main site by entering the url (or following some link) and landing on the main homepage and then switch language, effectively going to en. I would like to store this info so the next time I visit it will redirect me automatically to en. My problem that I face is that I can not find a proper solution for the language switcher. If the primary site is then English site will. The English site will be running on its own wordpress installation in a subdomain of the main site. We are running a wordpress site with Greek content (political & economical analysis) and we want to set up an English site of our site.









Multisite language switcher