WordPress.org

Ready to get started?Download WordPress

Forums

xili-language
[resolved] [debugged] browser language undetected with IE8 (3 posts)

  1. z8po
    Member
    Posted 1 year ago #

    all is in the title, if you set xililanguage with browser language with IE8, and two favorite language (fr-FR and en-EN ) it won't work. I didn't test with IE7 and IE6 but should be the same bug. There is below the corrected function match_languages() line 2386 of the xili-language.php file.

    // to debug just add "$browserlanguage = strtolower($browserlanguage);" after the first foreach loop of match_languages() function, because IE send HTTP header in uppercase, and the function match_languages() line 2386 of xili-language.php file compare with lowercase.

    function match_languages ( $listofprefs, $listlanguages ) {
    
    			foreach($listofprefs as $browserlanguage => $priority) {
    					/* match root languages to give similar in site  - first : five chars langs*/
    					// HERE THE CORRECTION
    					$browserlanguage = strtolower($browserlanguage);
    
    [...]

    I wish it will save times. Great add-on, better written than q-translate, congratulation ! i luv the autocreation of translated post. For more information, you can contact me on z8po.dyndns.info or @z8po.

    http://wordpress.org/extend/plugins/xili-language/

  2. Michel - xiligroup dev
    Member
    Plugin Author

    Posted 1 year ago #

    Many thanks for your active contribution...
    I will add these modified lines in next release...
    As I just said in a today support email, IE world is very strange...

    I will keep you informed directly.

    M.

  3. z8po
    Member
    Posted 1 year ago #

    i'm honored ;) maybe there is a better way to do it, i patched it on the fly, i'll take a look this evening maybe better can be done.
    Just IE is a piece of s**t, microsoft never care about web standard.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic