Detect language if no cookie
Closed this issue · 7 comments
Instead of setting the default language in Yii (en-US
), it would be nice if this extension could "guess" the language of the user, based on:
- the language of the browser
- the location of the user (using php-geoip http://php.net/manual/en/book.geoip.php or any other/better?)
As an extra, it would be nice if the order/priority of the above checks can be configured (the same way the cookie name can be configured).
Also, make a fallback option, aka, if the detected language is X, but the extension's laguages
option was set only to A, B, C
, use a fallback language.
Thanks for the suggestion, I'll try to implement it this week.
Nice! :)
Can you implement GeoIP based detection capabilities too?
GeoIP is not yet implemented The language is currently determined by the browser's language.
Yes, I saw that, I was asking if you plan to implement it, and if "yes", maybe reopen this issue? :)
I am not sure if I am going to implement it yet. I need to do a bit of research.
Ok, ask me if you have any questions ;)
I'd do it myself, but, you know... time... (or the lack of it)