Cyclone3 Skin

TOM::Int::lng

From Cyclone3 Wiki

Internationalization toolbox.

browser_autodetect()

Checks $main::ENV{'HTTP_ACCEPT_LANGUAGE'} against @TOM::LNG_accept values and returns ISO standard 2-letter locale string, when a match is found. Used ie. when directing new incoming users to their most probable language mutation of your site.

If no match is found in the accepted locale list, function tries to set up probable language using Geo::IP.

Syntax:

$locale=TOM::Int::lng::browser_autodetect();