Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Language Guess from IPby rob_au (Abbot) |
on Dec 05, 2002 at 13:41 UTC ( [id://217760]=note: print w/replies, xml ) | Need Help?? |
A better approach than attempting to determine language preference from geographical location would be to make use of the Accept-Language header field as defined for HTTP/1.1 in RFC 2616. The module I18N::AcceptLanguage performs this task by matching language preference to available languages defined in this HTTP/1.1 header field. From the documentation for this module:
perl -le 'print+unpack("N",pack("B32","00000000000000000000000111110100"))'
In Section
Seekers of Perl Wisdom
|
|