Reference for language code : Language Code
<?php
$currLang = get_bloginfo('language');
if($currLang == "id-ID"){ // Replace condition with your language code.
echo 'Bahasa Indonesia';
} else {
echo 'up to you'
}
?>
<?php
$currLang = get_bloginfo('language');
if($currLang == "id-ID"){ // Replace condition with your language code.
echo 'Bahasa Indonesia';
} else {
echo 'up to you'
}
?>
or you can browse these get_locale()
, pll_current_language()
@rainb3rry that's exactly what you need. get_bloginfo('language');
does not return the correct result, it always returns en-US for me.
Thank you so much dude