Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter MuninMunin

    (@muninmunin)

    Thank you, this is all I needed to hear.

    And again, thank you so much for this amazing plugin, it is my favorite thing in the entirety of wordpress.

    Thread Starter MuninMunin

    (@muninmunin)

    @alexgff

    I finally got some time to check out what is wrong with the redirect feature and… surprise! It doesn’t work exactly like I guessed. This probably is the case for any variation of one language.

    I didn’t test the actual cookie setting yet because I honestly have no experience with this kind of thing, but I threw this piece of code while on the /br page of my website:

    <?php
    
    $lang1 = WPGlobus::Config()->language; // how you guys usually check for language
    
    $redirect1 = substr( $_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2 ); //line used on redirect
    
    echo "<h1> Your browser language is " . $lang1 . " while redirect thinks it is " . $redirect1 ."</h1>"
    
    ?>

    And the result was…

    “Your browser language is br while redirect thinks it is pt”

    The two variables you’re using are conflicting.

    The issue is probably not with the actual object trying to redirect but how it is comparing, like I stated before, WP-globus set in Brazilian Portuguese considers it as “br”, logically so because it wants to differ itself from “pt”.

    However browsers present themselves as “pt-br” ALWAYS, and so do web pages on html’s lang property. the substr is taking the “pt”, looks up if my the website has a “pt” lang, which it doesn’t, and doesn’t redirect.

    Again, I could be wrong, because I didn’t find what is using public static function redirect( $language ) {

    But this is most likely what it seems to be.

    Now for my case I’ll likely throw an if statement on the redirect object and pray I remember that if the software updates. But this is a problem that is probably making many users not even know their website is not redirecting, and undermining your own work.

    I know I’m no one to ask you guys to fix a service you’re doing for free, and I’m not. However, please perhaps next time not just dismiss a report and mark as solved?

    Thread Starter MuninMunin

    (@muninmunin)

    …I don’t think so?

    I tried on opera with no cookies, tried in another pc inside my network and two phones that never accessed the website. All have Portuguese as their language but it only opens on the English default, never redirects to /br.

    Only action taken android’s chrome that likes to be all independent and translate by itself.

    Do you have any suggestions?

    Thread Starter MuninMunin

    (@muninmunin)

    Yeah, I was looking at the examples and doing some testings with it as I forgot some of them.

    I guess that was it then XD Thank you and sorry to bother you ^^

    Thread Starter MuninMunin

    (@muninmunin)

    Hey Phil, I found what it is causing it and… it is weird.

    Apparently it is not the theme nor other plugins (I searched through all the files if there was something that wrapped with them). I wrote on the visual section of the post [image-carousel interval=”12000″] and on the text section it automatically formatted it to be wrapped on them.

    It is (thankfully) easy to avoid as you can see, but this never happened before when I tested it.

    Thread Starter MuninMunin

    (@muninmunin)

    Thank you, keep the good work =)

    Can you post more screenshots (like you did with the main WPGlobus) on how to use it and how is it supposed to work? Because I’ve activated the featured one and I have no clue what should be appearing to tell what is wrong.

    Thread Starter MuninMunin

    (@muninmunin)

    I managed to do my own dropup menu (code updated in case anyone wishes to use it) without relying on plugin’s configuration a couple of days ago. Though I still would like to know which variables stores this configuration…

    Anyway, thank you for the plugin and sorry to bother =)

    function globusless_link($url){	//prevents error by removing language from the url
    		$blog = get_bloginfo( 'url');
    		$blog = substr($blog, 0,-3); //removes the language sign of the url.
    		$blog .= $url;
    		return $blog;
    	}

    In case somebody runs into this problem (like directly linking a picture), this should help.

    Half an hour later after hunting this variable down in the middle of 2600+ lines of code, I find this post LOL.

    Thanks for posting anyway =)

Viewing 10 replies - 1 through 10 (of 10 total)