Page 1 of 2
Your opinion on the new Droopy's Lib site?
Posted: Tue Dec 05, 2006 6:31 am
by lexvictory
I would like you to have a look at a new site that I designed in the past couple of days.
It is the Droopy's Lib site which I manage.
located at:
http://new-droopy.coolinc.info/ (this will change when it replaces the main site)
if your browser is set to prefer French pages to English ones, you will most likely get the French version of the site.
could you please let me know what you think of the site?, and if you speak french and spot any obvious errors in google's translation, please tell me.
the news page has an explanation about the new site, as does the index page, but to a lesser extent
Posted: Tue Dec 05, 2006 12:24 pm
by srod
I automatically get the French pages for some reason! There's nothing amiss with my computer's regional settings etc.
Posted: Tue Dec 05, 2006 12:32 pm
by Derek
Yeah, I get the french as well.
Posted: Tue Dec 05, 2006 12:40 pm
by chromaX
Same here.
In my opinion the light green and the blue kind of "bite" each other...
I would stick to just one color, namely blue.
Posted: Tue Dec 05, 2006 12:40 pm
by lexvictory
well thats odd...
and it has nothing to do with ure regional settings, it has to do with ure browsers settings, and i dont know how to configure it in IE, but if you use Firefox or opera i can help u...
can u both please go to
http://new-droopy.coolinc.info/showacceptlang.php and tell me what it says for u?
Posted: Tue Dec 05, 2006 12:43 pm
by srod
It says 'en-gb'.
I use IE 6.
Posted: Tue Dec 05, 2006 12:45 pm
by chromaX
Opera: de-CH,de;q=0.9,en;q=0.8
Settings are therefor:
1. de-CH
2. de
3. en
(Which variable contains this useful info?)
Posted: Tue Dec 05, 2006 12:50 pm
by lexvictory

thats f*****g odd....because neither of u hav french comming as the first 2 characters...
this is the php code behind it:
Code: Select all
if (strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], "fr") == 0) {
$langdir = "fr";
} else {
$langdir = "en";
}
i.e. its testing for if fr starts at the first character....
i think i know what it is; the strpos is evaluating to a bool false value, so the == thinks that it equals 0....
gimme a moment and i'll modify it so that it checks if its bool false first...
Posted: Tue Dec 05, 2006 12:52 pm
by lexvictory
ok, can u all please try loading the main page again?
Posted: Tue Dec 05, 2006 12:53 pm
by Derek
I get the same as Srod
En gb
I'm using ie7
Posted: Tue Dec 05, 2006 12:54 pm
by Derek
It's in english now.
Posted: Tue Dec 05, 2006 12:57 pm
by srod
Now it's in bloody German!
Looks good.
Posted: Tue Dec 05, 2006 12:58 pm
by lexvictory
well, thats good....
me and php dont always mix correctly....

coz it treats bools differently to pb....
Now it's in bloody German!
now that i would love to see.....

Posted: Tue Dec 05, 2006 1:14 pm
by chromaX
Don't check for bool, just do it with" ===". This checks also the type of the Variable without another function.
Code: Select all
if (strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], "fr") === FALSE) {
$langdir = "fr";
} else {
$langdir = "en";
}
Also, your code has a weak point. If someone has multiple preferences (like I do) you should check for the language which appears first, assuming that they are ordered after preference. Or (I don't know if the Syntax Opera uses is generally used, I'll be checking that) do it with an array, first splitting the string with regular expressions and then comparing the priority of $array['en'] and $array['fr'].
/EDIT: It is the same syntax, at least in FF.
/EDIT2: If it's just two languages, my second point can be ignored.
Posted: Tue Dec 05, 2006 1:21 pm
by lexvictory
chromaX wrote:Don't check for bool, just do it with" ===". This checks also the type of the Variable without another function.
Code: Select all
if (strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], "fr") === 0) {
$langdir = "fr";
} else {
$langdir = "en";
}
Also, your code has a weak point. If someone has multiple preferences (like I do) you should check for the language which appears first, assuming that they are ordered after preference. Or (I don't know if the Syntax Opera uses is generally used, I'll be checking that) do it with an array, first splitting the string with regular expressions and then comparing the priority of $array['en'] and $array['fr'].
well, i have it fixed, but with a slightly different arrangement....
and since the site has only 2 languages, i simply check if french is the first priority, usually its the first option, and if french isnt the 1st one, it gives the english version....
wats the bet that i'll now get complaints that the french people are getting the english version....
