The Locale property sets/returns the client-side locale. Locales specify the language conditions under which the application was launched. By changing the Locale property, the application can be made to display a specific language.
Syntax | |
Locale() | |
Return value | |
Type |
Description |
Long |
Locale of the client |
Parameter | |
None |
Example
In the code below, the client-side locale is queried and, depending on the local, the client- and server-side locale is set.
Loc := Client.Locale
If (Loc And &H07) = &H07 Then
#German, sets Server Locale on German and Client Locale on English
Server.DialogLanguage := "DE"
Server.Locale := 1031
Client.Locale := 1031
ElseIf (Loc And &H09) = &H09 Then
#English, sets Server Locale on English and Client Locale on English
Server.DialogLanguage := "UK"
Server.Locale := 1033
Client.Locale := 1033
ElseIf (Loc And &H04) = &H04 Then
#Chinese, sets Server Locale on English and Client Locale on English
Server.DialogLanguage := "CH"
Server.Locale := 1033
Client.Locale := 1033
ElseIf (Loc And &H0C) = &H0C Then
#Frensh
Server.DialogLanguage := "FR"
Server.Locale := 1033
Client.Locale := 1033
ElseIf (Loc And &H0A) = &H0A Then
#Spanish
Server.DialogLanguage := "ES"
Server.Locale := 1033
Client.Locale := 1033
ElseIf (Loc And &H10) = &H10 Then
#Italian
Server.DialogLanguage := "IT"
Server.Locale := 1033
Client.Locale := 1033
Else
#Anything else
Server.DialogLanguage := "UK"
Server.Locale := 1033
Client.Locale := 1033
EndIf