pasBrowserLanguages - cWebApp

Use this property to query the preferred languages as they are reported by the browser

Type: Property (Web Property)

Access: Read/Write

Data Type: String[]

Parameters: None

 { WebProperty=Client }
 Property String[] pasBrowserLanguages

Web Property Read Access: WebGet pasBrowserLanguages to StringArrayVariable
Web Property Write Access: WebSet pasBrowserLanguages to StringArrayVariable/Value

Read Access: Get pasBrowserLanguages to StringArrayVariable
Write Access: Set pasBrowserLanguages to StringArrayVariable/Value


Use this property to query the preferred languages as they are reported by the browser.

In most modern browsers a list of preferred languages can be configured where the first item in the array is the preferred language.

The framework sets the property based on the first request. WebApp developers should consider using this as a read-only property.

Object oShowLanguageBtn is a cWebButton
    Set piColumnSpan to 2
    Set psCaption to "Show language"

    Procedure OnClick
        String[] asLanguages
        WebGet pasBrowserLanguages of ghoWebApp to asLanguages
        Send ShowInfoBox (SFormat("Prefered browser languages are: %1", StrJoinFromArray(asLanguages, ", ")))        

About Web Properties
Each web property maintains two values: The regular property value is set during object creation and should not be changed during the lifetime of that object. To access that value, use the standard property Get and Set syntax.
The web property value is the local value stored at each client. This is synchronized to the client's local value whenever a server call is being processed. To access the web property value, use the WebGet and WebSet syntax above instead of the standard Get and Set syntax.