masek wrote:if ( de) set_lang(de) else if ( fr) set_lang(fr)
else set_lang(en)
This is a bit backwards, no? Instead of going through the list of languages you support until you find one that the client requested, you should go through the languages the client requested until you find one that you support.
How to say looks very logical ,
So Default is English, if i found language different in list it will be set automatically to it.
masek wrote:if ( de) set_lang(de) else if ( fr) set_lang(fr)
else set_lang(en)
This is a bit backwards, no? Instead of going through the list of languages you support until you find one that the client requested, you should go through the languages the client requested until you find one that you support.
How to say looks very logical ,
So Default is English, if i found language different in list it will be set automatically to it.
The problem is that very few clients will not request a language at all (raise your hands if you browse the web with "telnet gokifu.com 80n GET /index.html 1.0") so it makes more sense to read the list they hand to you as it should be in preferred order.