useragent
Engine Compatibility
This library has not yet been ported to the New Pico Engine
The User Agent Library
The User Agent library provides access to information about the user agent string. The following functions are available:
useragent:language()
returns the natural language version of language.- useragent:language_code returns the ISO code (e.g. "en" for english) of language.
useragent:browser_name(). returns the name of the browser (e.g "Internet Explorer").
useragent:browser_version()
returns the complete version string.useragent:browser_version_major()
returns the part preceding "." in version string.useragent:browse_version_minor()
returns the part following "." in version string.
useragent:os()
returns the operation system.
useragent:os_type()
returns the general type of OS (e.g "Linux).
useragent:os_version()
returns the version of OS.
The language Function
The useragent:language returns the natural language version of language.
The following is an example of useragent:language.
pre{ naturalLanguage = useragent:language(); }
Copyright Picolabs | Licensed under Creative Commons.