WordPress.org

Ready to get started?Download WordPress

Forums

Multisite Language Switcher
[resolved] Adding language dependent code in templates (2 posts)

  1. josee225
    Member
    Posted 1 year ago #

    Hi,

    I need to add a space for advertizing in my them template, but I don't know how to make it language specific?

    By that I mean, is there any way to implement something along the lines of:
    if language = french
    (whatever language specific code)
    else
    (the other language specific code)
    close if

    Thank you.

    http://wordpress.org/extend/plugins/multisite-language-switcher/

  2. realloc
    Member
    Plugin Author

    Posted 1 year ago #

    Yes ...

    $blog     = MslsBlogCollection::instance()->get_current_blog();
    $language = $blog->get_language();
    if ( 'fr_FR' == $language ) {
        echo 'French';
    }
    else {
        echo 'Another language';
    }

    Please have a look here: https://github.com/lloc/Multisite-Language-Switcher/wiki/Get-the-current-language

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.