WordPress.org

Ready to get started?Download WordPress

Forums

mLanguage
[resolved] set language from url (3 posts)

  1. kissja74
    Member
    Posted 3 years ago #

    Hi, I'd like to make a small modify in your plugin but no success. I'd like to be able to set the displayed language also from url (with $_GET ), but I can't find the right place for this in your code.
    I admit that I'm a lame, I simply can't find where you get the cookie's value :)

    Any help would be appreciated.

    (WP 3.1 ML 1.5.6)

    http://wordpress.org/extend/plugins/mlanguage/

  2. Alexander Rauscha
    Member
    Plugin Author

    Posted 3 years ago #

    check mlanguage.php line 83

    add
    $s = $_GET[your_param];

    after
    if($_COOKIE["WPmlang"]) $s = substr($_COOKIE["WPmlang"], 0, 2);

    and delete the cookie code in mlanguge.js on line 53 + 54

  3. kissja74
    Member
    Posted 3 years ago #

    okay, i'm officially lame :(

    i did the same but it didn't work till now when i recognized that in the url i put the param after a "?" instead of "&"... sometimes i'm so dumb :(

    for the titles i did the same at function mlang_title ( for the title there is a $c ) and now it works like a charm :-)

    thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags