...
The User Agent library provides access to information about the user agent string.
The language Function
The The following functions are available:
useragent:language()
returns the natural language version of language.
...
...
...
pre{
naturalLanguage = useragent:language();
}
The language_code Function
...
- _code returns the ISO code (e.g. "en" for english) of language
...
The browser_name Function
...
- .
useragent:browser_name(). returns the name of the browser (e.g "Internet Explorer")
...
The browser_version Function
...
.
useragent:browser_version()
returns the complete version string
...
The browser_version_major Function
...
- .
useragent:browser_version_major()
returns the part preceding "." in version string.
...
...
()
returns the part following "." in version string
...
.
...
...
()
returns the operation system.
The os_type Function
...
...
()
returns the general type of OS (e.g "Linux).
...
useragent:os_version()
returns the version of OS.
The language Function
The useragent:os_versionlanguage returns the natural language version of OSof language.
The following is an example of useragent:language.
Code Block | ||
---|---|---|
| ||
pre{
naturalLanguage = useragent:language();
} |