Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The User Agent library provides access to information about the user agent string.

The language Function

The  The following functions are available:

...

...

...

pre{
  naturalLanguage = useragent:language();
}

The language_code Function

...

  • _code returns the ISO code (e.g. "en" for english) of language

...

The browser_name Function

...

...

The browser_version Function

...

...

The browser_version_major Function

...

...

...

  • () returns the part following "." in version string

...

  • .

...

...

  • () returns the operation system.

The os_type Function

...

...

  • () returns the general type of OS (e.g "Linux).

...

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
languagejavascript
pre{
  naturalLanguage = useragent:language();
}