Language not switching correctly.
-
Hi,
Polylang plugin is superb. I am very happy to use it. I had setup everything and working fine on my local setup. Then I implemented on my site
https://www.esimsar.com/blog/. My default lang is “Arabic” and other one is English. Posts are switching when I click language switcher. But when I check current language it is always showing “Arabic”.$currentlang = get_bloginfo('language'); <?php if($currentlang=="ar"): ?> dir="rtl" <?php else: ?> dir="ltr" <?php endif; ?>This code always showing arabic only even I switch to English.
<html <?php language_attributes(); ?>>.I have tried functions
pll_the_languages()
andget_locale(). But still current language is same (arabic).I am using this code for language swicther:
<?php pll_the_languages(array('dropdown'=>0, 'hide_current'=>0, 'hide_if_no_translation'=>1, 'show_names'=>1)); ?>
This shows both languages.Can anyone please help me on this. Thanks in advance,
The page I need help with: [log in to see the link]
The topic ‘Language not switching correctly.’ is closed to new replies.