Add this function to your functions.php:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 | function is_lang($search_lang){ $return = false; $languages = icl_get_languages('skip_missing=0'); if(!empty($languages)){ foreach($languages as $lang => $l){ if($l['active'] && $lang == $search_lang){ $return = true; } } } return $return; } |
Then in the custom section of the new widget area (for JumpStart):
is_lang(‘es’)
for spanish (see languages and edit in the dark boxes for language ids)
The is_lang() function could also be used like is_page elsewhere in the code.