Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
Table Body (tbody) |
---|
id | getAvailableTimeZoneIDs |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getAvailableTimeZoneIDs |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
| getAvailableTimeZoneIDs |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Get the list of available time zones. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
//Get the list of available time zones
var timezones = i18n.getAvailableTimeZoneIDs();
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getCountries}{tr:id=name}{td}h6.getCountries{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]\[]{span}{span:style=font-weight: bold;}getCountries{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets the list of countries available for localization{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]\[] -- a String array containing the available countries.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
i18n.getCountries()
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getCurrentCountry}{tr:id=name}{td}h6.getCurrentCountry{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getCurrentCountry{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String] -- a String representing the current country.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getCountries |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets the list of countries available for localization |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns
Div |
---|
| String[] – a String array containing the available countries. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
i18n.getCountries()
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getCurrentCountry |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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) |
---|
| Table Cell (td) |
---|
Returns
Div |
---|
| String – a String representing the current country. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var currCountry = i18n.getCurrentCountry();
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getCurrentLanguage}{tr:id=name}{td}h6.getCurrentLanguage{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getCurrentLanguage{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String] -- a String representing the current language.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getCurrentLanguage |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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) |
---|
| Table Cell (td) |
---|
Returns
Div |
---|
| String – a String representing the current language. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var currLang = i18n.getCurrentLanguage();
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getCurrentTimeZone}{tr:id=name}{td}h6.getCurrentTimeZone{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getCurrentTimeZone{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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).{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String] -- a String representing the current time zone.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getCurrentTimeZone |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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) |
---|
| Table Cell (td) |
---|
Returns
Div |
---|
| String – a String representing the current time zone. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var currTimeZone = i18n.getCurrentTimeZone();
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDefaultDateFormat}{tr:id=name}{td}h6.getDefaultDateFormat{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getDefaultDateFormat{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets the current default date format; based on the current locale settings in the Servoy Client Locale preferences.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String] -- a String representing the default date format.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets the current default date format; based on the current locale settings in the Servoy Client Locale preferences. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns
Div |
---|
| String – a String representing the default date format. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var defaultDateFormat = i18n.getDefaultDateFormat();
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDefaultNumberFormat}{tr:id=name}{td}h6.getDefaultNumberFormat{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getDefaultNumberFormat{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets the current default number format; based on the current locale settings in the Servoy Client Locale preferences.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String] -- a String representing the default number format.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
| getDefaultNumberFormat |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets the current default number format; based on the current locale settings in the Servoy Client Locale preferences. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns
Div |
---|
| String – a String representing the default number format. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var defaultNumberFormat = i18n.getDefaultNumberFormat() |
|
|
|
| ;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getI18NMessage-String}{tr:id=name}{td}h6.getI18NMessage{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getI18NMessage{span}{span}\(i18nKey){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets the real message (for the clients locale) for a specified message key.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} i18nKey -- The message key
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String] -- a String that is the message for the message key.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getI18NMessage |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets the real message (for the clients locale) for a specified message key. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters
Div |
---|
| {String} i18nKey – The message key |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns
Div |
---|
| String – a String that is the message for the message key. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
// 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'))
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id= Table Body (tbody) |
---|
id | getI18NMessage-String_ObjectArray |
---|
| }{:=name}{td}h6.getI18NMessage{td}{tr}{tr:id=sig}{td}{span:style= | Table Cell (td) |
---|
getI18NMessage |
|
| }[]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} i18nKey -- The message key
\{[Object]\[]} dynamicValues -- Arguments array when using parameter substitution.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String] -- a String that is the message for the message key.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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) |
---|
| Table Cell (td) |
---|
Parameters
Div |
---|
| {String} i18nKey – The message key {Object[]} dynamicValues – Arguments array when using parameter substitution. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns
Div |
---|
| String – a String that is the message for the message key. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
// 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'))
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getLanguages}{tr:id=name}{td}h6.getLanguages{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSDataSet]{span}{span:style=font-weight: bold;}getLanguages{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns a dataset with rows that contains a language key (en) and the displayname (English) column.
See Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getLanguages |
|
| {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSDataSet] -- a JSDataSet with all the languages.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns
Div |
---|
| JSDataSet – a JSDataSet with all the languages. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var set = i18n.getLanguages();
for(var i=1;i<=set.getMaxRowIndex();i++)
{
application.output(set.getValue(i, 1) + " " + set.getValue(i, 2));
}
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getSystemMessages}{tr:id=name}{td}h6.getSystemMessages{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSDataSet]{span}{span:style=font-weight: bold;}getSystemMessages{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSDataSet] -- a JSDataSet with all the system messages.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getSystemMessages |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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) |
---|
| Table Cell (td) |
---|
Returns
Div |
---|
| JSDataSet – a JSDataSet with all the system messages. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var set = i18n.getSystemMessages();
for(var i=1;i<=set.getMaxRowIndex();i++)
{
application.output(set.getValue(i, 1) + " " + set.getValue(i, 2)+ " " + set.getValue(i, 3));
}
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTimeZoneOffset-String}{tr:id=name}{td}h6.getTimeZoneOffset{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Number]{span}{span:style=font-weight: bold;}getTimeZoneOffset{span}{span}\(timeZoneId){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns the offset (in milliseconds) of this time zone from UTC for the current date or at the specified date.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} timeZoneId -- The time zone to get the offset for.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number] -- an int representing the time zone's offset from UTC.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
id | getTimeZoneOffset-String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getTimeZoneOffset |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns the offset (in milliseconds) of this time zone from UTC for the current date or at the specified date. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters
Div |
---|
| {String} timeZoneId – The time zone to get the offset for. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns
Div |
---|
| Number – an int representing the time zone's offset from UTC. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var timeZoneOffset = i18n.getTimeZoneOffset('America/Los_Angeles');
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id= Table Body (tbody) |
---|
id | getTimeZoneOffset-String_Date |
---|
| }{:=}{td}h6.getTimeZoneOffset{td}{tr}{tr:id=sig}{td}{span:style= | Table Cell (td) |
---|
getTimeZoneOffset |
|
| }[]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns the offset (in milliseconds) of this time zone from UTC for the current date or at the specified date.{div}{td}{tr}{tr:id=prs}{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.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number] -- an int representing the time zone's offset from UTC.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns the offset (in milliseconds) of this time zone from UTC for the current date or at the specified date. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters
Div |
---|
| {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) |
---|
| Table Cell (td) |
---|
Returns
Div |
---|
| Number – an int representing the time zone's offset from UTC. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var timeZoneOffset = i18n.getTimeZoneOffset('America/Los_Angeles');
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTimeZones}{tr:id=name}{td}h6.getTimeZones{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]\[]{span}{span:style=font-weight: bold;}getTimeZones{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns an array of known timezones.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]\[] -- an Array with all the timezones.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getTimeZones |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns an array of known timezones. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns
Div |
---|
| String[] – an Array with all the timezones. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var timeZones = i18n.getTimeZones();
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id= Table Body (tbody) |
---|
id | setI18NMessage-String_String |
---|
| }{:=}{td}h6.setI18NMessage{td}{tr}{tr:id=sig}{td}{span:style= | Table Cell (td) |
---|
setI18NMessage |
|
| }{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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){div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} i18nKey -- The message key
\{[String]} value -- They value for the message key.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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) |
---|
| Table Cell (td) |
---|
Parameters
Div |
---|
| {String} i18nKey – The message key {String} value – They value for the message key. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
//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 |
|
|
|
| ')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id= Table Body (tbody) |
---|
id | setLocale-String_String |
---|
| }{:=}{td}h6.setLocale{td}{tr}{tr:id=sig}{td}{span:style= }{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{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.chemie.fu\-berlin.de/diverse/doc/ISO\_3166.html |
|
|
|
i18n{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} language -- The lowercase 2 letter code
\{[String]} country -- The upper case 2 letter code.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters
Div |
---|
| {String} language – The lowercase 2 letter code {String} country – The upper case 2 letter code. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
//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');
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setTimeZone}{tr:id=name}{td}h6.setTimeZone{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}setTimeZone{span}{span}\(){span}{td}{tr}{tr:id=des}{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".{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setTimeZone |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
// This will set the default time zone to Central European Time
i18n.setTimeZone("Europe/Amsterdam");
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |