I have a bilingual site (FR & EN) and I used Polylang plugin to create the second language. I would like to use the Elementor popups to have one that appears for each language. I can’t find a way to make one popup appear only on the French site and another popup for the English version.
Thank you for your help,
Best regards!
Means — <meta property=”og:url” content=”https://www.unrevealedfiles.com/” /> is not changing to <meta property=”og:url” content=”https://en.unrevealedfiles.com/” />
it remains same in both version of the site when i switch to english site.
Could anyone help me with my site, please. It works in two languages: english (default) and russian. When i try to open the main page (it should work in english)- www.stylenfashionjunky.com, it redirects me to the other main page, in russian – https://www.stylenfashionjunky.com/ru/
Even when i try to switch the language on the main page i keep staying at the same russian page!
I use Polylang plagin but i dont remember such a problem before (((
Thank you very much for your advices.
I’m using the pitch theme on two websites, one is premium the other is not…. would this make any difference?
Can anyone help?
All the best and thanks in advance.
MrsB
The below codes are in mirror on both sites:
in functions.php:
function BilingualLink($post_id, $linktext = "en", $beforelink = "<p id='lang_link'>", $afterlink = "</p>", $defaulturl = "https://www.mydomain.com/", $linktitle = "English", $doecho = false)
{
$otherlangurl = get_post_meta($post_id, "Alt_Lang_ID", true);
if ($otherlangurl != '' && (is_single() || is_page()))
{
$langlink = $beforelink . '<a href="'. $defaulturl . '' . $otherlangurl . '" title="' . $linktitle . '">' . $linktext . '</a>' . $afterlink;
}
elseif ((is_category() || is_day() || is_month() || is_year() || is_tag() || is_author()) && !(is_home() || is_front_page() || is_tax() || is_search()))
{
$langlink = $beforelink . '<a href="'. $defaulturl . 'news/" title="' . $linktitle . '">' . $linktext . '</a>' . $afterlink;
}
elseif (is_tax())
{
$langlink = $beforelink . '<a href="'. $defaulturl . 'mycustomfield" title="' . $linktitle . '">' . $linktext . '</a>' . $afterlink;
}
else {
$langlink = $beforelink . '<a href="' . $defaulturl . '" title="' . $linktitle . '">' . $linktext . '</a>' . $afterlink;
}
if ($doecho) {
echo ($langlink);
} else {
return $langlink;
}
}
in header.php:
<?php // Bilingual Link
if ( function_exists( 'BilingualLink' ) ) :
echo BilingualLink( $post->ID, 'en', '<p id="lang_link">', '</p>'); endif;?>
It works like a charm on PC/MAC, in different browsers, but in Google Chrome on mobile devices (tested on Ipad/Android) the link is not loaded, but only if I check the “Request Desktop Site”. (The site does not have a mobile theme).
Any idea how to solve this issue?
]]>