-
AuthorPosts
-
August 17, 2021 at 9:59 pm #1317207
Hi,
I am translating my site in English and I can`t find a way to translate the logo. I am using Polylang, I have found the following topic, but it is not working for me:I will be grateful if you can help.
Thank you.Galina
August 19, 2021 at 5:15 am #1317410Hey galgro,
Thank you for the inquiry.
Did you adjust the language locale in this line?
if ($lang == 'fr_FR')
If you are trying to change the logo in the English version for example, the locale should be “en_US”.
function av_change_logo($logo){ $lang = pll_current_language('locale'); if ($lang == 'en_US') { $logo = "LOGO URL FOR ENGLISH LANGUAGE HERE"; } return $logo; } add_filter('avf_logo','av_change_logo');
Best regards,
IsmaelAugust 19, 2021 at 9:50 am #1317451Hello, Ismael,
Thank you.
Can I put this code in the Quick CSS redactor?
Actually I tried, but it doesn`t work.
Or can I put some code there, which can help.I have also problems with the Copyright text in the Socket for the both languages. The default language is Bulgarian and the second is English.
How can I a remove the Kriesi link from the both languages:
© Copyright – Strategic Framework for Development of Education, Training and Learning in the Republic of Bulgaria (2021 – 2030) – Enfold Theme by Kriesi
© Copyright – Стратегическа рамка за развитие на образованието, обучението и ученето в Република България (2021 – 2030) – Enfold Theme by KriesiThank you.
GalinaAugust 19, 2021 at 11:08 am #1317469I solved the problem with the links by putting [nolink] after the two texts in the translation of Strings section.
I just cant find the way to change the logo for the english version of the site.
I hope you can help.Galina
August 19, 2021 at 11:37 am #1317473Actually the text [nolink] is now visible, so the problem with the Kriesi link for the both languages is also not solved.
I hope you can help.
Thank you.Galina
August 19, 2021 at 2:19 pm #1317501Sorry for the many messages.
I put the following code in the function.php file and now the logo is bilingual and the text in the socket also changes correctly in both languages.function av_change_logo($logo){
$lang = pll_current_language(‘locale’);
if ($lang == ‘en_GB’)
{
$logo = “https://edu-strategy.mon.bg/wp-content/uploads/2021/08/Logo_MON_470x138px_EN.png”;
}
return $logo;
}
add_filter(‘avf_logo’,’av_change_logo’);add_filter(‘kriesi_backlink’,’socket_per_language’);
function socket_per_language(){
$currentlang = get_bloginfo(‘language’);if($currentlang==”en_GB”) {
$output = “© Copyright – Strategic Framework for Development of Education, Training and Learning in the Republic of Bulgaria (2021 – 2030).”;
}
elseif($currentlang==”bg_BG”) {
$output = “© Copyright – Стратегическа рамка за развитие на образованието, обучението и ученето в Република България (2021 – 2030).”;
}
return $output;
}Galina
August 20, 2021 at 11:39 am #1317599 -
AuthorPosts
- The topic ‘Translate Logo using Polylang’ is closed to new replies.