I installed Polylang Plugin and configed that but I have a problem when I set the default language in Persian language the site loaded in English mode and it is not deference if change default language because in any way in run site loaded by English version. I installed 3 languages: Persian, English, French Wordpress version is 4.1.1 and Polylang Plugin version is 1.8.5 How can I fixed the default language in fa-IR? please help me
this solution isn't standard! but work for me :)
replace (comment) this line in wp-content/plugins/polylang/frontend/choose-lang.php
file (line 185)
$language = $this->options['hide_default'] && ( ( isset( $_SERVER['HTTP_REFERER'] ) && in_array( parse_url( $_SERVER['HTTP_REFERER'], PHP_URL_HOST ), $this->links_model->get_hosts() ) ) || ! $this->options['browser'] ) ?
$this->model->get_language( $this->options['default_lang'] ) :
$this->get_preferred_language(); // sets the language according to browser preference or default language
by
$language = 'fa';