0

I have a problem with translation.

I have website in two languages - SK (main) and US

1) Issue

In posts - US language have no idea how can I translate buttons like "Read More" etc. - https://www.laraservis.sk/en/news/

And maybe same issue - but in contact page you can see three icons (location, phone, email) - same problem, dont know how to translate to US

How to fix this please?

2) Issue

I put directly into code call to action (so now its not possible to translate this to US language) - you can see blue frame above - https://www.laraservis.sk/en/storage-spaces/

Is there any way how to fix it?

Thank you for your help.

1 Answers1

0

If you are using polylang plugin for language selection & you want to change the the texts in the custom files, then there is only one way to convert text in other languages in custom template files.

Please find the code below:

<?php // Fetching current language 
$currentlang = pll_current_language();
if($currentlang == 'sk') { $read_more = "ZobraziƄ"; } 
if($currentlang == 'en') { $read_more = "Read More"; }  
?>

And place this php variable '$read_more' where you want to use it, just like this:

<a href="https://www.laraservis.sk/en/new-halls/" class="theme-btn read-more"><?php echo $read_more; ?></a>

I hope, this may be helpful to you.

Prateek Verma
  • 869
  • 1
  • 6
  • 9