• Resolved diego018

    (@diego018)


    i have a wordpress blog in 2 languages. by default, i have:
    <meta http-equiv=”Content-Language” content=”ES”>

    but i would like to have in some pages that are in English “EN” this meta tag changed.

    any idea on how can i do that? all posts that are in english are in a subfolder “url/en/post.html”
    maybe php can help me here?

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

    (@diego018)

    someone helped me at digitalpoint and here is the code, useful for blogs in multiple languages. i share it here with you.
    <?php
    {$lang = “es, us”;} //this is the default to show
    if(preg_match(“/\/en\//”,$_SERVER[‘REQUEST_URI’])) {
    $lang = “en, us”; //if the post has in the url /en/ show this.
    }
    ?>
    <meta http-equiv=”Content-Language” content=”<?php echo $lang ?>”>

Viewing 1 replies (of 1 total)
  • The topic ‘change "content-language" meta tag in each page.’ is closed to new replies.