Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

micheledisalvatore on "[Plugin: Polylang] Incongruity between global lang and post lang"

$
0
0

the work flow is:

_construct sets: en
home_language sets: it

I edited this function in this way:

protected function home_language() {
		// test referer in case PLL_COOKIE is set to false
		// thanks to Ov3rfly http://wordpress.org/support/topic/enhance-feature-when-front-page-is-visited-set-language-according-to-browser
		/*
    $this->set_language(
			$this->options['hide_default'] && ((isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], $this->domain) !== false)) ?
				$this->model->get_language($this->options['default_lang']) :
				$this->get_preferred_language() // sets the language according to browser preference or default language
		);
		*/
	}

And now it works in the right way.


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>