1

I have a floating widget in my footer and I want to give it a link to another page. I have 4 languages in my website "Turkish" "English" "Russian" and "Arabic"

I want this widget's link to redirect page "target page"

If im on Turkish page link should go to page "target page-Turkish"

If im on English page link should go to page "target page-English"

If im on Russian page link should go to page "target page-Russian"

If im on Arabic page link should go to page "target page-Arabic"

This is my floating widget's code:

 <div class="sepetyazisi">
    <a href="www.myweb.com/en/targetpage/"<?php pll_e('Teklif Sepeti'); ?></a>
    </div>

This is how I added the Polylang strings with adding to function.php file

add_action('init', function() {
  pll_register_string('porto-theme', 'Teklif Sepeti');
});

But if I give it a direct link as my example code, it's always redirecting to "www.myweb.com/en/targetpage/"

How can I achieve different links per language for same string?

özgür kuş
  • 93
  • 1
  • 9

0 Answers0