DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING. THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR. Enter additional information related to this 'class' inside the {div} macro with 'id=description'
servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClientservoy sSummary12%30%58%height: 30px;3Methods SummaryGet the list of available time zones.
Gets the currency format from client (using client's locale).Gets the current country; based on the current locale settings in the Servoy Client Locale preferences.Gets the current private extensions; based on the current locale settings in the Servoy Client Locale preferences.
...
Gets the current language; based on the current locale settings in the Servoy Client Locale preferences.
Gets the real message (for the clients locale) for a specified message key.Gets the real message using specified locale for a specified message key.
...
Gets the real message using the specified locale for a specified message key.Returns a dataset with rows that contains a language key (en) and the displayname (English) column.
Gets the number format from client (using client's locale).Returns a dataset with rows that contains 3 columns: 'key' (i18n key), 'reference' (reference text for that key) and 'locale ([CURRENT_LOCALE])' (where [CURRENT_LOCALE] is the current language) - with the system messages of servoy.
Returns the offset (in milliseconds) of this time zone from UTC for the current date or at the specified date.
Table Row (tr)
id
prs
Table Cell (td)
Parameters
Div
class
sIndent
{String} timeZoneId - The time zone to get the offset for. {Date} date - The date in the time zone (default current date). Needed in case daylight saving time/GMT offset changes are used in the time zone.
Table Row (tr)
id
ret
Table Cell (td)
Returns
Div
class
sIndent
Number - an int representing the time zone's offset from UTC.
Table Row (tr)
id
sam
Table Cell (td)
Sample
Div
class
sIndent
Code Block
language
javascript
var timeZoneOffset = i18n.getTimeZoneOffset('America/Los_Angeles');
Sets the value of i18n key for client scope,if value null the setting is removed. All forms not yet loaded will change (execute this in solution startup or first form)
Table Row (tr)
id
prs
Table Cell (td)
Parameters
Div
class
sIndent
{String} i18nKey - The message key {String} value - They value for the message key.
Table Row (tr)
id
ret
Table Cell (td)
Returns
Div
class
sIndent
void
Table Row (tr)
id
sam
Table Cell (td)
Sample
Div
class
sIndent
Code Block
language
javascript
//sets the value of i18n key for client scope; if value null the setting is removed
//Warning: already created form elements with i18n text lookup will not change,
//so call this method in the solution startup method or in methods from first form
//this method saves message for current locale, so if locale is changed with setLocale, all messages set from scripting will be lost
i18n.setI18NMessage('mykey.username.text','my_name')
...
class
lastDetailRow
...
id
setLocale-String_String
Table Row (tr)
id
name
Table Cell (td)
setLocale
Table Row (tr)
id
sig
Table Cell (td)
Span
style
margin-right: 5px;
void
Span
style
font-weight: bold;
setLocale
Span
(language, country)
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Set/Overwrite the locale for this client. All forms not yet loaded will change (execute this in solution startup or first form).
The language must be a lowercase 2 letter code defined by ISO-639. see http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt The country must be an upper case 2 letter code defined by IS-3166 see http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html
NOTE: For more information on i18n, see the chapter on Internationalization (i18n) in the Servoy Developer User's Guide, beginning with the Introduction to i18n
Table Row (tr)
id
prs
Table Cell (td)
Parameters
Div
class
sIndent
{String} language - The lowercase 2 letter code {String} country - The upper case 2 letter code.
Table Row (tr)
id
ret
Table Cell (td)
Returns
Div
class
sIndent
void
Table Row (tr)
id
sam
Table Cell (td)
Sample
Div
class
sIndent
Code Block
language
javascript
//Warning: already created form elements with i18n text lookup will not change,
//so call this method in the solution startup method or in methods from first form
i18n.setLocale('en','US');
...
class
lastDetailRow
...
id
setTimeZone
Table Row (tr)
id
name
Table Cell (td)
setTimeZone
Table Row (tr)
id
sig
Table Cell (td)
Span
style
margin-right: 5px;
void
Span
style
font-weight: bold;
setTimeZone
Span
()
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Sets the current time zone of the client. The parameter should be a string having the format which can be retrieved via i18n.getAvailableTimeZones or can be seen in the SmartClient Edit -> Preferences -> Locale at the "Default Timezone" combobox. For instance the time zone for Netherlands is set using the ID "Europe/Amsterdam".
Table Row (tr)
id
ret
Table Cell (td)
Returns
Div
class
sIndent
void
Table Row (tr)
id
sam
Table Cell (td)
Sample
Div
class
sIndent
Code Block
language
javascript
// This will set the default time zone to Central European Time
i18n.setTimeZone("Europe/Amsterdam");
Gets the current country; based on the current locale settings in the Servoy Client Locale preferences.
NOTE: For more information on i18n, see the chapter on Internationalization (i18n) in the Servoy Developer User's Guide, beginning with the Introduction to i18n
Table Row (tr)
id
ret
Table Cell (td)
Returns
Div
class
sIndent
String - a String representing the current country.
Gets the current language; based on the current locale settings in the Servoy Client Locale preferences.
NOTE: For more information on i18n, see the chapter on Internationalization (i18n) in the Servoy Developer User's Guide, beginning with the Introduction to i18n
Table Row (tr)
id
ret
Table Cell (td)
Returns
Div
class
sIndent
String - a String representing the current language.
Gets the current time zone of the client; based on the current locale settings in the Servoy Client Locale preferences. For Servoy Web Clients the time zone is given by the browser (if it is possible to obtain it).
Table Row (tr)
id
ret
Table Cell (td)
Returns
Div
class
sIndent
String - a String representing the current time zone.
String - a String that is the message for the message key.
Table Row (tr)
id
sam
Table Cell (td)
Sample
Div
class
sIndent
Code Block
language
javascript
// returns 'Welcome my_name in my solution'
// if the key 'mykey.username.text' is 'Welcome {0} in my solution'
i18n.getI18NMessage('mykey.username.text',new Array('my_name'))
Gets the real message (for the clients locale) for a specified message key. You can use parameter substitution by using {n}, where n is a index number of the value thats in the arguments array.
Table Row (tr)
id
prs
Table Cell (td)
Parameters
Div
class
sIndent
{String} i18nKey - The message key {Object[]} dynamicValues - Arguments array when using parameter substitution.
Table Row (tr)
id
ret
Table Cell (td)
Returns
Div
class
sIndent
String - a String that is the message for the message key.
Table Row (tr)
id
sam
Table Cell (td)
Sample
Div
class
sIndent
Code Block
language
javascript
// returns 'Welcome my_name in my solution'
// if the key 'mykey.username.text' is 'Welcome {0} in my solution'
i18n.getI18NMessage('mykey.username.text',new Array('my_name'))
Returns a dataset with rows that contains 3 columns: 'key' (i18n key), 'reference' (reference text for that key) and 'locale ([CURRENT_LOCALE])' (where [CURRENT_LOCALE] is the current language) - with the system messages of servoy. This means all servoy messages, with all available translations.
Table Row (tr)
id
ret
Table Cell (td)
Returns
Div
class
sIndent
JSDataSet - a JSDataSet with all the system messages.
Gets the current country; based on the current locale settings in the Servoy Client Locale preferences.
NOTE: For more information on i18n, see the chapter on Internationalization in the Servoy Developer User's Guide, and the chapter on Internationalization-I18N in the Programming Guide.
ret
Returns
sIndent a String representing the current country.clients
Gets the current private extensions; based on the current locale settings in the Servoy Client Locale preferences.
NOTE: For more information on i18n, see the chapter on Internationalization in the Servoy Developer User's Guide, and the chapter on Internationalization-I18N in the Programming Guide.
ret
Returns
sIndent an array of Strings representing the current extensions.clients
Gets the current language; based on the current locale settings in the Servoy Client Locale preferences.
NOTE: For more information on i18n, see the chapter on Internationalization in the Servoy Developer User's Guide, and the chapter on Internationalization-I18N in the Programming Guide.
ret
Returns
sIndent a String representing the current language.clients
Gets the current time zone of the client; based on the current locale settings in the Servoy Client Locale preferences. For Servoy Web Clients the time zone is given by the browser (if it is possible to obtain it).
ret
Returns
sIndent a String representing the current time zone.clients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowgetDateFormatname
getDateFormat()
dessIndent
Gets the date format from client (using client's locale).
ret
Returns
sIndent a String representing the date format.clients
Gets the real message (for the clients locale) for a specified message key.
You can use parameter substitution by using {n}, where n is a index number of the value thats in the arguments array.
prs
Parameters
sIndenti18nKeyThe message keydynamicValuesArguments array when using parameter substitution.ret
Returns
sIndent a String that is the message for the message key.clients
Gets the real message using specified locale for a specified message key.
You can use parameter substitution by using {n}, where n is a index number of the value thats in the arguments array.
prs
Parameters
sIndenti18nKeyThe message keydynamicValuesArguments array when using parameter substitution.languageThe lowercase 2 letter code of the localecountryThe upper case 2 letter code of the localeret
Returns
sIndent a String that is the message for the message key.clients
Supported Clients
sIndentWebClient,NGClient,MobileClientsam
Sample
sIdentjavascriptlastDetailRowgetI18NMessagename
getI18NMessage(i18nKey, language, country)
dessIndent
Gets the real message using the specified locale for a specified message key.
prs
Parameters
sIndenti18nKeyThe message keylanguageThe lowercase 2 letter code of the localecountryThe upper case 2 letter code of the localeret
Returns
sIndent a String that is the message for the message key.clients
Supported Clients
sIndentWebClient,NGClient,MobileClientsam
Sample
sIdentjavascriptlastDetailRowgetLanguagesname
getLanguages()
dessIndent
Returns a dataset with rows that contains a language key (en) and the displayname (English) column.
See http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt for a list that could be returned.
ret
Returns
sIndent a JSDataSet with all the languages.clients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowgetNumberFormatname
getNumberFormat()
dessIndent
Gets the number format from client (using client's locale).
ret
Returns
sIndent a String representing the number format.clients
Returns a dataset with rows that contains 3 columns: 'key' (i18n key), 'reference' (reference text for that key) and 'locale ([CURRENT_LOCALE])' (where [CURRENT_LOCALE] is the current language) - with the system messages of servoy.
This means all servoy messages, with all available translations.
ret
Returns
sIndent a JSDataSet with all the system messages.clients
Returns the offset (in milliseconds) of this time zone from UTC for the current date or at the specified date.
prs
Parameters
sIndenttimeZoneIdThe time zone to get the offset for.dateThe date in the time zone (default current date). Needed in case daylight saving time/GMT offset changes are used in the time zone.ret
Returns
sIndent an int representing the time zone's offset from UTC.clients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowgetTimeZonesname
getTimeZones()
dessIndent
Returns an array of known timezones.
ret
Returns
sIndent an Array with all the timezones.clients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowsetI18NMessagename
setI18NMessage(i18nKey, value)
dessIndent
Sets the value of i18n key for client scope,if value null the setting is removed.
All forms not yet loaded will change (execute this in solution startup or first form)
prs
Parameters
sIndenti18nKeyThe message keyvalueThey value for the message key.clients
Set/Overwrite the locale for this client.
All forms not yet loaded will change (execute this in solution startup or first form).
The language must be a lowercase 2 letter code defined by ISO-639.
see ISO 639-1 codes at http://en.wikipedia.org/wiki/List_of_ISO_639-1_code
The country must be an upper case 2 letter code defined by ISO-3166
see ISO-3166-1 codes at http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
NOTE: For more information on i18n, see the chapter on Internationalization in the Servoy Developer User's Guide, and the chapter on Internationalization-I18N in the Programming Guide.
prs
Parameters
sIndentlanguageThe lowercase 2 letter codecountryThe upper case 2 letter code.clients
Set/Overwrite the locale for this client.
All forms not yet loaded will change (execute this in solution startup or first form).
The language must be a lowercase 2 letter code defined by ISO-639.
see ISO 639-1 codes at http://en.wikipedia.org/wiki/List_of_ISO_639-1_code
The country must be an upper case 2 letter code defined by ISO-3166
see ISO-3166-1 codes at http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
The extensions must be an array of strings indicating for example different industries. Each extension string must consist of only letters and digits with a max length of 8 characters
see private extensions at https://docs.oracle.com/javase/tutorial/i18n/locale/extensions.html
NOTE: For more information on i18n, see the chapter on Internationalization in the Servoy Developer User's Guide, and the chapter on Internationalization-I18N in the Programming Guide.
prs
Parameters
sIndentlanguageThe lowercase 2 letter codecountryThe upper case 2 letter codeextensionsarray of private extensions stringsclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowsetTimeZonename
setTimeZone(timezone)
dessIndent
Sets the current time zone of the client.
The parameter should be a string having the format which can be retrieved via i18n.getAvailableTimeZones or
can be seen in the SmartClient Edit -> Preferences -> Locale at the "Default Timezone" combobox.
For instance the time zone for Netherlands is set using the ID "Europe/Amsterdam".