Forum Replies Created

Viewing 1 replies (of 1 total)
  • I’ve had to do that several times before, and i solved it with bogo_language_switcher_links hook, and adding the following in functions.php:

    add_filter('bogo_language_switcher_links', 'change_lang_link_names', 10, 2);
    function change_lang_link_names($links, $args) {
    	foreach($links as $index => $link) {
    		switch($link['locale']) {
    			case 'en_CA':
    				$link['native_name'] = __( 'English', 'bogo' );
    				break;
    			case 'fr_CA':
    				$link['native_name'] = __( 'Fran?ais', 'bogo' );
    				break;
    		}
    		$links[$index] = $link;
    	}
    	return $links;
    }
Viewing 1 replies (of 1 total)