• I have a bilingual worpress site.
    I would like the tagline to switch language just like the rest of the template switches languages.
    Is there a $message I need no modify in the header?
    Has anyone experience

    <?php $site_description = get_bloginfo( 'description', 'display' );
    	if ( $site_description )
    		echo " $site_description"; ?>

    and this
    <?php $site_description = get_bloginfo( $language, $display ); ?>

    but no luck. I’m not a coder, so forgive my ignorance.

    What I’m saying is the header does not change according to language as does the rest of the page.
    Can I use an if statement, like if lang eq en…?

    Again I just want the tile and tagline to display in the language of the rest of the page so the website is truly bilingual.

    I’m using xi dictionary and qlanguage plugins.

    Anybody got an idea?

Viewing 1 replies (of 1 total)
  • Thread Starter razoredger

    (@razoredger)

    Surfing the net, I found the answer to my question here:
    https://www.zyblog.de/2006/01/15/localizing-wordpress-themes/

    Here is the key, add you theme domain text to the function:
    <strong><?php _e('description','dialogue');?></strong>

    I used this in the title and header descriptions to display the texts in the language that the page is displaying for a blilingual website.

    Now a request to all you great themers, please use the above format instead of hard-coding standard text strings everywhere in your templates. That way many more people around the world will use them in different languages or on multilingual websites like the one I am doing now. You’ll make friends and your theme will gain popularity for sure!

Viewing 1 replies (of 1 total)
  • The topic ‘show tagline based on language’ is closed to new replies.