• Resolved Pancho Perez

    (@lonchbox)


    Hi,

    The thing is in my project is not a multilanguage project and we are not using multisite to manage each language, just one of the subsite is in a different language than the rest. So first what we create is a de_DE.po file of the theme where the core language is en_GB, what we need is to only one of the subsite use the de_DE.po the rest have to keep using the core lang.

    Any idea if this is possible?, BTW we don′t want to use WPML becasue is too much for what we need.

    Thanx again for any advice or sugestion.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Yes. You can have different sites use different languages. Once the language packs are installed (you’ll want to include the one for core as well), a new option in wp-admin -> options shows up to pick the language ??

    Thread Starter Pancho Perez

    (@lonchbox)

    oh! great. I test it.

    Thread Starter Pancho Perez

    (@lonchbox)

    @ipstenu the translation works but only for the dashboard, the theme (frontend) doesn′t take the subsite language ??

    What I did was to first upload the German Language .po & .mo files to wp-content, then change the wplang in wp-config.php to de_DE. Till here works, I can go to Settings -> General and choose the language for the subsite, in this case the subsite must be in english, again the dashboard language work but not for the frontend of that subsite, even if the THeme used by the subsite have the /language folder with the en_GB.po & .mo files in it.

    You know what I mean ?

    Thread Starter Pancho Perez

    (@lonchbox)

    with @gabrielperezs found a solution use the textdomain and blog/site ID.

    function weg_localisation() {
        global $blog_id;
        if ( $blog_id == 7 ) {
            unload_textdomain('my-theme-string');
            $s = load_textdomain('my-theme-string', get_stylesheet_directory() . '/languages/en_GB.mo');
        }
    }
    add_action('init', 'weg_localisation');
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Make a one of the subsites use different .po than the multisite have’ is closed to new replies.