Child pages
  • i18n

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
{hidden} DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING. THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden} {sub-section:description|text=}{sub-section}\\{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#getCurrentCountry]\() Gets the current country; based on the current locale settings in the Servoy Client Locale preferences.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getCurrentLanguage]\() Gets the current language; based on the current locale settings in the Servoy Client Locale preferences.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getCurrentTimeZone]\() Gets the current timezone of the client; based on the current locale settings in the Servoy Client Locale preferences.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getDefaultDateFormat]\() Gets the current default date format; based on the current locale settings in the Servoy Client Locale preferences.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getDefaultNumberFormat]\() Gets the current default number format; based on the current locale settings in the Servoy Client Locale preferences.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getI18NMessage]\(i18nKey, dynamicValues) Gets the real message (for the clients locale) for a specified message key.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#getLanguages]\() Returns a dataset with rows that contains a language key (en) and the displayname (English) column.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#getSystemMessages]\() 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.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getTimeZoneOffset]\(timezone, date) Returns the offset (in milliseconds) of this time zone from UTC for the current date or at the specified date.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getTimeZones]\() Returns an array of known timezones.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setI18NMessage]\(i18nKey, value) Sets the value of i18n key for client scope,if value null the setting is removed.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setI18NMessagesFilter]\(columnName, value) Call this if you want to add a filter for a column (created by you) in the i18n table.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setLocale]\(language, country) Set/Overwrite the locale for this client.{td}{tr}{tbody}{table}\\{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=CE79004A-6B3F-4032-8620-CD57D32856B4}{tr:id=name}{td}h6.getCurrentCountry{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getCurrentCountry{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:CE79004A-6B3F-4032-8620-CD57D32856B4_des|text=|trigger=button}{sub-section}{sub-section:CE79004A-6B3F-4032-8620-CD57D32856B4_des|trigger=none|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{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:CE79004A-6B3F-4032-8620-CD57D32856B4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CE79004A-6B3F-4032-8620-CD57D32856B4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:CE79004A-6B3F-4032-8620-CD57D32856B4_ret|text=|trigger=button}{sub-section}{sub-section:CE79004A-6B3F-4032-8620-CD57D32856B4_ret|trigger=none|class=sIndent}[String] -- a String representing the current country.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:CE79004A-6B3F-4032-8620-CD57D32856B4_see|text=|trigger=button}{sub-section}{sub-section:CE79004A-6B3F-4032-8620-CD57D32856B4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:CE79004A-6B3F-4032-8620-CD57D32856B4_see|text=|trigger=button}{sub-section}{sub-section:CE79004A-6B3F-4032-8620-CD57D32856B4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:CE79004A-6B3F-4032-8620-CD57D32856B4_sam|text=|trigger=button}{sub-section}{sub-section:CE79004A-6B3F-4032-8620-CD57D32856B4_sam|class=sIndent|trigger=none}{code:language=javascript} var
Wiki Markup
Div
styledisplay:none

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.

Div
iddescription



HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
String[]
Table Cell (td)
getAvailableTimeZoneIDs()
Get the list of available time zones.
Table Row (tr)
Table Cell (td)
String[]
Table Cell (td)
getCountries()
Gets the list of countries available for localization
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getCurrentCountry()
Gets the current country; based on the current locale settings in the Servoy Client Locale preferences.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getCurrentLanguage()
Gets the current language; based on the current locale settings in the Servoy Client Locale preferences.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getCurrentTimeZone()
Gets the current time zone of the client; based on the current locale settings in the Servoy Client Locale preferences.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getDefaultDateFormat()
Gets the current default date format; based on the current locale settings in the Servoy Client Locale preferences.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getDefaultNumberFormat()
Gets the current default number format; based on the current locale settings in the Servoy Client Locale preferences.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getI18NMessage(i18nKey)
Gets the real message (for the clients locale) for a specified message key.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getI18NMessage(i18nKey, dynamicValues)
Gets the real message (for the clients locale) for a specified message key.
Table Row (tr)
Table Cell (td)
JSDataSet
Table Cell (td)
getLanguages()
Returns a dataset with rows that contains a language key (en) and the displayname (English) column.
Table Row (tr)
Table Cell (td)
JSDataSet
Table Cell (td)
getSystemMessages()
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.
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
getTimeZoneOffset(timeZoneId)
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)
Number
Table Cell (td)
getTimeZoneOffset(timeZoneId, date)
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)
String[]
Table Cell (td)
getTimeZones()
Returns an array of known timezones.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
setI18NMessage(i18nKey, value)
Sets the value of i18n key for client scope,if value null the setting is removed.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
setLocale(language, country)
Set/Overwrite the locale for this client.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
setTimeZone()
Sets the current time zone of the client.



HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Details
Table Body (tbody)
idgetAvailableTimeZoneIDs
Table Row (tr)
idname
Table Cell (td)

getAvailableTimeZoneIDs

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String[]
Span
stylefont-weight: bold;
getAvailableTimeZoneIDs
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the list of available time zones.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String[]
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
//Get the list of available time zones
var timezones = i18n.getAvailableTimeZoneIDs();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetCountries
Table Row (tr)
idname
Table Cell (td)

getCountries

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String[]
Span
stylefont-weight: bold;
getCountries
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets the list of countries available for localization
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String[] - a String array containing the available countries.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
i18n.getCountries()
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetCurrentCountry
Table Row (tr)
idname
Table Cell (td)

getCurrentCountry

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getCurrentCountry
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

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)
idret
Table Cell (td)

Returns

Div
classsIndent
String - a String representing the current country.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var currCountry = i18n.getCurrentCountry();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=D5DE9CE3-F0C0-492F-90E5-A009A0BA7659}{tr:id=name}{td}h6.getCurrentLanguage{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getCurrentLanguage{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:D5DE9CE3-F0C0-492F-90E5-A009A0BA7659_des|text=|trigger=button}{sub-section}{sub-section:D5DE9CE3-F0C0-492F-90E5-A009A0BA7659_des|trigger=none|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{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:D5DE9CE3-F0C0-492F-90E5-A009A0BA7659_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D5DE9CE3-F0C0-492F-90E5-A009A0BA7659_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D5DE9CE3-F0C0-492F-90E5-A009A0BA7659_ret|text=|trigger=button}{sub-section}{sub-section:D5DE9CE3-F0C0-492F-90E5-A009A0BA7659_ret|trigger=none|class=sIndent}[String] -- a String representing the current language.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D5DE9CE3-F0C0-492F-90E5-A009A0BA7659_see|text=|trigger=button}{sub-section}{sub-section:D5DE9CE3-F0C0-492F-90E5-A009A0BA7659_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D5DE9CE3-F0C0-492F-90E5-A009A0BA7659_see|text=|trigger=button}{sub-section}{sub-section:D5DE9CE3-F0C0-492F-90E5-A009A0BA7659_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D5DE9CE3-F0C0-492F-90E5-A009A0BA7659_sam|text=|trigger=button}{sub-section}{sub-section:D5DE9CE3-F0C0-492F-90E5-A009A0BA7659_sam|class=sIndent|trigger=none}{code:language=javascript} var currLang = i18n.getCurrentLanguage(); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=B2F77A17-D1C1-49A7-A174-677F85F9F51C}{tr:id=name}{td}h6.getCurrentTimeZone{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getCurrentTimeZone{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:B2F77A17-D1C1-49A7-A174-677F85F9F51C_des|text=|trigger=button}{sub-section}{sub-section:B2F77A17-D1C1-49A7-A174-677F85F9F51C_des|trigger=none|class=sIndent}Gets the current timezone of the client; based on the current locale settings in the Servoy Client Locale preferences.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:B2F77A17-D1C1-49A7-A174-677F85F9F51C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B2F77A17-D1C1-49A7-A174-677F85F9F51C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:B2F77A17-D1C1-49A7-A174-677F85F9F51C_ret|text=|trigger=button}{sub-section}{sub-section:B2F77A17-D1C1-49A7-A174-677F85F9F51C_ret|trigger=none|class=sIndent}[String] -- a String representing the current timezone.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B2F77A17-D1C1-49A7-A174-677F85F9F51C_see|text=|trigger=button}{sub-section}{sub-section:B2F77A17-D1C1-49A7-A174-677F85F9F51C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B2F77A17-D1C1-49A7-A174-677F85F9F51C_see|text=|trigger=button}{sub-section}{sub-section:B2F77A17-D1C1-49A7-A174-677F85F9F51C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B2F77A17-D1C1-49A7-A174-677F85F9F51C_sam|text=|trigger=button}{sub-section}{sub-section:B2F77A17-D1C1-49A7-A174-677F85F9F51C_sam|class=sIndent|trigger=none}{code:language=javascript} var currTimeZone = i18n.getCurrentTimeZone(); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=4381AD51-740A-4086-9CA3-9330C353E1A3}{tr:id=name}{td}h6.getDefaultDateFormat{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getDefaultDateFormat{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:4381AD51-740A-4086-9CA3-9330C353E1A3_des|text=|trigger=button}{sub-section}{sub-section:4381AD51-740A-4086-9CA3-9330C353E1A3_des|trigger=none|class=sIndent}Gets the current default date format; based on the current locale settings in the Servoy Client Locale preferences.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:4381AD51-740A-4086-9CA3-9330C353E1A3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4381AD51-740A-4086-9CA3-9330C353E1A3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:4381AD51-740A-4086-9CA3-9330C353E1A3_ret|text=|trigger=button}{sub-section}{sub-section:4381AD51-740A-4086-9CA3-9330C353E1A3_ret|trigger=none|class=sIndent}[String] -- a String representing the default date format.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4381AD51-740A-4086-9CA3-9330C353E1A3_see|text=|trigger=button}{sub-section}{sub-section:4381AD51-740A-4086-9CA3-9330C353E1A3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4381AD51-740A-4086-9CA3-9330C353E1A3_see|text=|trigger=button}{sub-section}{sub-section:4381AD51-740A-4086-9CA3-9330C353E1A3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4381AD51-740A-4086-9CA3-9330C353E1A3_sam|text=|trigger=button}{sub-section}{sub-section:4381AD51-740A-4086-9CA3-9330C353E1A3_sam|class=sIndent|trigger=none}{code:language=javascript} var defaultDateFormat = i18n.getDefaultDateFormat(); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=B1812278-B4BF-4C45-B253-5A4342A5211D}{tr:id=name}{td}h6.getDefaultNumberFormat{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getDefaultNumberFormat{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:B1812278-B4BF-4C45-B253-5A4342A5211D_des|text=|trigger=button}{sub-section}{sub-section:B1812278-B4BF-4C45-B253-5A4342A5211D_des|trigger=none|class=sIndent}Gets the current default number format; based on the current locale settings in the Servoy Client Locale preferences.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:B1812278-B4BF-4C45-B253-5A4342A5211D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B1812278-B4BF-4C45-B253-5A4342A5211D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:B1812278-B4BF-4C45-B253-5A4342A5211D_ret|text=|trigger=button}{sub-section}{sub-section:B1812278-B4BF-4C45-B253-5A4342A5211D_ret|trigger=none|class=sIndent}[String] -- a String representing the default number format.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B1812278-B4BF-4C45-B253-5A4342A5211D_see|text=|trigger=button}{sub-section}{sub-section:B1812278-B4BF-4C45-B253-5A4342A5211D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B1812278-B4BF-4C45-B253-5A4342A5211D_see|text=|trigger=button}{sub-section}{sub-section:B1812278-B4BF-4C45-B253-5A4342A5211D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B1812278-B4BF-4C45-B253-5A4342A5211D_sam|text=|trigger=button}{sub-section}{sub-section:B1812278-B4BF-4C45-B253-5A4342A5211D_sam|class=sIndent|trigger=none}{code:language=javascript} var defaultNumberFormat = i18n.getDefaultNumberFormat(); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=37E65570-6B1F-4854-8654-B6F1D81C9E11}{tr:id=name}{td}h6.getI18NMessage{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getI18NMessage{span}{span:id=iets|style=float: left;}\(i18nKey, dynamicValues){span}{td}{tr}{tr:id=des}{td}{sub-section:37E65570-6B1F-4854-8654-B6F1D81C9E11_des|text=|trigger=button}{sub-section}{sub-section:37E65570-6B1F-4854-8654-B6F1D81C9E11_des|trigger=none|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.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:37E65570-6B1F-4854-8654-B6F1D81C9E11_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:37E65570-6B1F-4854-8654-B6F1D81C9E11_prs|trigger=none}i18nKey -- The message key \[dynamicValues\] -- Arguments array when using parameter substitution. {sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:37E65570-6B1F-4854-8654-B6F1D81C9E11_ret|text=|trigger=button}{sub-section}{sub-section:37E65570-6B1F-4854-8654-B6F1D81C9E11_ret|trigger=none|class=sIndent}[String] -- a String that is the message for the message key.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:37E65570-6B1F-4854-8654-B6F1D81C9E11_see|text=|trigger=button}{sub-section}{sub-section:37E65570-6B1F-4854-8654-B6F1D81C9E11_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:37E65570-6B1F-4854-8654-B6F1D81C9E11_see|text=|trigger=button}{sub-section}{sub-section:37E65570-6B1F-4854-8654-B6F1D81C9E11_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:37E65570-6B1F-4854-8654-B6F1D81C9E11_sam|text=|trigger=button}{sub-section}{sub-section:37E65570-6B1F-4854-8654-B6F1D81C9E11_sam|class=sIndent|trigger=none}{code: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')) {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=4983BC4F-8512-4C5E-A87B-BD0F119E2864}{tr:id=name}{td}h6.getLanguages{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}getLanguages{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:4983BC4F-8512-4C5E-A87B-BD0F119E2864_des|text=|trigger=button}{sub-section}{sub-section:4983BC4F-8512-4C5E-A87B-BD0F119E2864_des|trigger=none|class=sIndent}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.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:4983BC4F-8512-4C5E-A87B-BD0F119E2864_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4983BC4F-8512-4C5E-A87B-BD0F119E2864_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:4983BC4F-8512-4C5E-A87B-BD0F119E2864_ret|text=|trigger=button}{sub-section}{sub-section:4983BC4F-8512-4C5E-A87B-BD0F119E2864_ret|trigger=none|class=sIndent}[JSDataSet] -- a JSDataSet with all the languages.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4983BC4F-8512-4C5E-A87B-BD0F119E2864_see|text=|trigger=button}{sub-section}{sub-section:4983BC4F-8512-4C5E-A87B-BD0F119E2864_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=link}{td}*External links*\\{sub-section:4983BC4F-8512-4C5E-A87B-BD0F119E2864_see|text=|trigger=button}{sub-section}{sub-section:4983BC4F-8512-4C5E-A87B-BD0F119E2864_link|class=sIndent|trigger=none}http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt {sub-section}{td}{tr}{tr:id=sam}{td}*Sample*\\{sub-section:4983BC4F-8512-4C5E-A87B-BD0F119E2864_sam|text=|trigger=button}{sub-section}{sub-section:4983BC4F-8512-4C5E-A87B-BD0F119E2864_sam|class=sIndent|trigger=none}{code:language=javascript} var set = i18n.getLanguages(); for(var i=1;i<=set.getMaxRowIndex();i++) { application.output(set.getValue(i, 1) + " " + set.getValue(i, 2)); } {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AE45BD4D-F998-49BD-A106-1EB8187A9BC1}{tr:id=name}{td}h6.getSystemMessages{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}getSystemMessages{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:AE45BD4D-F998-49BD-A106-1EB8187A9BC1_des|text=|trigger=button}{sub-section}{sub-section:AE45BD4D-F998-49BD-A106-1EB8187A9BC1_des|trigger=none|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.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:AE45BD4D-F998-49BD-A106-1EB8187A9BC1_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AE45BD4D-F998-49BD-A106-1EB8187A9BC1_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:AE45BD4D-F998-49BD-A106-1EB8187A9BC1_ret|text=|trigger=button}{sub-section}{sub-section:AE45BD4D-F998-49BD-A106-1EB8187A9BC1_ret|trigger=none|class=sIndent}[JSDataSet] -- a JSDataSet with all the system messages.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AE45BD4D-F998-49BD-A106-1EB8187A9BC1_see|text=|trigger=button}{sub-section}{sub-section:AE45BD4D-F998-49BD-A106-1EB8187A9BC1_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AE45BD4D-F998-49BD-A106-1EB8187A9BC1_see|text=|trigger=button}{sub-section}{sub-section:AE45BD4D-F998-49BD-A106-1EB8187A9BC1_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AE45BD4D-F998-49BD-A106-1EB8187A9BC1_sam|text=|trigger=button}{sub-section}{sub-section:AE45BD4D-F998-49BD-A106-1EB8187A9BC1_sam|class=sIndent|trigger=none}{code:language=javascript} 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}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=206FD99D-C020-4401-84C4-D9F92A789600}{tr:id=name}{td}h6.getTimeZoneOffset{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getTimeZoneOffset{span}{span:id=iets|style=float: left;}\(timezone, date){span}{td}{tr}{tr:id=des}{td}{sub-section:206FD99D-C020-4401-84C4-D9F92A789600_des|text=|trigger=button}{sub-section}{sub-section:206FD99D-C020-4401-84C4-D9F92A789600_des|trigger=none|class=sIndent}Returns the offset (in milliseconds) of this time zone from UTC for the current date or at the specified date.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:206FD99D-C020-4401-84C4-D9F92A789600_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:206FD99D-C020-4401-84C4-D9F92A789600_prs|trigger=none}timezone -- The timezone to get the offset for. \[date\] -- The date in the timezone (default current data) {sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:206FD99D-C020-4401-84C4-D9F92A789600_ret|text=|trigger=button}{sub-section}{sub-section:206FD99D-C020-4401-84C4-D9F92A789600_ret|trigger=none|class=sIndent}[Number] -- an int representing the timezone offset from UTC.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:206FD99D-C020-4401-84C4-D9F92A789600_see|text=|trigger=button}{sub-section}{sub-section:206FD99D-C020-4401-84C4-D9F92A789600_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:206FD99D-C020-4401-84C4-D9F92A789600_see|text=|trigger=button}{sub-section}{sub-section:206FD99D-C020-4401-84C4-D9F92A789600_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:206FD99D-C020-4401-84C4-D9F92A789600_sam|text=|trigger=button}{sub-section}{sub-section:206FD99D-C020-4401-84C4-D9F92A789600_sam|class=sIndent|trigger=none}{code:language=javascript} var timeZoneOffset = i18n.getTimeZoneOffset('America/Los_Angeles'); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F810E3A7-5D0F-45DD-A873-796C98428D64}{tr:id=name}{td}h6.getTimeZones{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getTimeZones{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:F810E3A7-5D0F-45DD-A873-796C98428D64_des|text=|trigger=button}{sub-section}{sub-section:F810E3A7-5D0F-45DD-A873-796C98428D64_des|trigger=none|class=sIndent}Returns an array of known timezones.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:F810E3A7-5D0F-45DD-A873-796C98428D64_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F810E3A7-5D0F-45DD-A873-796C98428D64_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F810E3A7-5D0F-45DD-A873-796C98428D64_ret|text=|trigger=button}{sub-section}{sub-section:F810E3A7-5D0F-45DD-A873-796C98428D64_ret|trigger=none|class=sIndent}[String]\[] -- an Array with all the timezones.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F810E3A7-5D0F-45DD-A873-796C98428D64_see|text=|trigger=button}{sub-section}{sub-section:F810E3A7-5D0F-45DD-A873-796C98428D64_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F810E3A7-5D0F-45DD-A873-796C98428D64_see|text=|trigger=button}{sub-section}{sub-section:F810E3A7-5D0F-45DD-A873-796C98428D64_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F810E3A7-5D0F-45DD-A873-796C98428D64_sam|text=|trigger=button}{sub-section}{sub-section:F810E3A7-5D0F-45DD-A873-796C98428D64_sam|class=sIndent|trigger=none}{code:language=javascript} var timeZones = i18n.getTimeZones(); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=20CA03F8-B49C-4C2C-BCD6-40DEF402488E}{tr:id=name}{td}h6.setI18NMessage{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setI18NMessage{span}{span:id=iets|style=float: left;}\(i18nKey, value){span}{td}{tr}{tr:id=des}{td}{sub-section:20CA03F8-B49C-4C2C-BCD6-40DEF402488E_des|text=|trigger=button}{sub-section}{sub-section:20CA03F8-B49C-4C2C-BCD6-40DEF402488E_des|trigger=none|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){sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:20CA03F8-B49C-4C2C-BCD6-40DEF402488E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:20CA03F8-B49C-4C2C-BCD6-40DEF402488E_prs|trigger=none}i18nKey -- The message key value -- They value for the message key. {sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:20CA03F8-B49C-4C2C-BCD6-40DEF402488E_ret|text=|trigger=button}{sub-section}{sub-section:20CA03F8-B49C-4C2C-BCD6-40DEF402488E_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:20CA03F8-B49C-4C2C-BCD6-40DEF402488E_see|text=|trigger=button}{sub-section}{sub-section:20CA03F8-B49C-4C2C-BCD6-40DEF402488E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:20CA03F8-B49C-4C2C-BCD6-40DEF402488E_see|text=|trigger=button}{sub-section}{sub-section:20CA03F8-B49C-4C2C-BCD6-40DEF402488E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:20CA03F8-B49C-4C2C-BCD6-40DEF402488E_sam|text=|trigger=button}{sub-section}{sub-section:20CA03F8-B49C-4C2C-BCD6-40DEF402488E_sam|class=sIndent|trigger=none}{code: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 i18n.setI18NMessage('mykey.username.text','my_name') {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A576BF94-95F9-4580-8382-4D6974492AA5}{tr:id=name}{td}h6.setI18NMessagesFilter{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setI18NMessagesFilter{span}{span:id=iets|style=float: left;}\(columnName, value){span}{td}{tr}{tr:id=des}{td}{sub-section:A576BF94-95F9-4580-8382-4D6974492AA5_des|text=|trigger=button}{sub-section}{sub-section:A576BF94-95F9-4580-8382-4D6974492AA5_des|trigger=none|class=sIndent}Call this if you want to add a filter for a column (created by you) in the i18n table. So that you can have multiple default values and multiple values per locale for one key.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:A576BF94-95F9-4580-8382-4D6974492AA5_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A576BF94-95F9-4580-8382-4D6974492AA5_prs|trigger=none}columnName -- The column name that is the filter column in the i18n table. value -- The filter value. {sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:A576BF94-95F9-4580-8382-4D6974492AA5_ret|text=|trigger=button}{sub-section}{sub-section:A576BF94-95F9-4580-8382-4D6974492AA5_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A576BF94-95F9-4580-8382-4D6974492AA5_see|text=|trigger=button}{sub-section}{sub-section:A576BF94-95F9-4580-8382-4D6974492AA5_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A576BF94-95F9-4580-8382-4D6974492AA5_see|text=|trigger=button}{sub-section}{sub-section:A576BF94-95F9-4580-8382-4D6974492AA5_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A576BF94-95F9-4580-8382-4D6974492AA5_sam|text=|trigger=button}{sub-section}{sub-section:A576BF94-95F9-4580-8382-4D6974492AA5_sam|class=sIndent|trigger=none}{code:language=javascript} // Puts i18n in filter mode - this allows you to have multiple default/per locale // values for one key and to use one of them based on the filter parameters. // Let's say you added a new column "message_variant" to your i18n table. // Now you can have keys that will translate to a language differently depending on the used variant // For example you have 2 rows in you table for key X, language EN, different values and different "message_variant" (let's say 1 and 2) // If you want the solution to use the first variant, you will have to call: i18n.setI18NMessagesFilter('message_variant', '1') // ATTENTION: if you use setI18NMessagesFilter(...) it is not recommended to use the i18n Dialog (especially before the filter is applied through JS). {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AD691CC7-EC0C-43C6-A483-5AC0A6A57E56}{tr:id=name}{td}h6.setLocale{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setLocale{span}{span:id=iets|style=float: left;}\(language, country){span}{td}{tr}{tr:id=des}{td}{sub-section:AD691CC7-EC0C-43C6-A483-5AC0A6A57E56_des|text=|trigger=button}{sub-section}{sub-section:AD691CC7-EC0C-43C6-A483-5AC0A6A57E56_des|trigger=none|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-649. 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{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:AD691CC7-EC0C-43C6-A483-5AC0A6A57E56_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AD691CC7-EC0C-43C6-A483-5AC0A6A57E56_prs|trigger=none}language -- The lowercase 2 letter code country -- The upper case 2 letter code. {sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:AD691CC7-EC0C-43C6-A483-5AC0A6A57E56_ret|text=|trigger=button}{sub-section}{sub-section:AD691CC7-EC0C-43C6-A483-5AC0A6A57E56_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AD691CC7-EC0C-43C6-A483-5AC0A6A57E56_see|text=|trigger=button}{sub-section}{sub-section:AD691CC7-EC0C-43C6-A483-5AC0A6A57E56_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AD691CC7-EC0C-43C6-A483-5AC0A6A57E56_see|text=|trigger=button}{sub-section}{sub-section:AD691CC7-EC0C-43C6-A483-5AC0A6A57E56_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AD691CC7-EC0C-43C6-A483-5AC0A6A57E56_sam|text=|trigger=button}{sub-section}{sub-section:AD691CC7-EC0C-43C6-A483-5AC0A6A57E56_sam|class=sIndent|trigger=none}{code: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'); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetCurrentLanguage
Table Row (tr)
idname
Table Cell (td)

getCurrentLanguage

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getCurrentLanguage
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

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)
idret
Table Cell (td)

Returns

Div
classsIndent
String - a String representing the current language.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var currLang = i18n.getCurrentLanguage();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetCurrentTimeZone
Table Row (tr)
idname
Table Cell (td)

getCurrentTimeZone

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getCurrentTimeZone
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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)
idret
Table Cell (td)

Returns

Div
classsIndent
String - a String representing the current time zone.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var currTimeZone = i18n.getCurrentTimeZone();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetDefaultDateFormat
Table Row (tr)
idname
Table Cell (td)

getDefaultDateFormat

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getDefaultDateFormat
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets the current default date format; based on the current locale settings in the Servoy Client Locale preferences.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String - a String representing the default date format.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var defaultDateFormat = i18n.getDefaultDateFormat();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetDefaultNumberFormat
Table Row (tr)
idname
Table Cell (td)

getDefaultNumberFormat

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getDefaultNumberFormat
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets the current default number format; based on the current locale settings in the Servoy Client Locale preferences.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String - a String representing the default number format.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var defaultNumberFormat = i18n.getDefaultNumberFormat();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetI18NMessage-String
Table Row (tr)
idname
Table Cell (td)

getI18NMessage

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getI18NMessage
Span
(i18nKey)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets the real message (for the clients locale) for a specified message key.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} i18nKey - The message key
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String - a String that is the message for the message key.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// 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'))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetI18NMessage-String_ObjectArray
Table Row (tr)
idname
Table Cell (td)

getI18NMessage

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getI18NMessage
Span
(i18nKey, dynamicValues)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} i18nKey - The message key
{Object[]} dynamicValues - Arguments array when using parameter substitution.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String - a String that is the message for the message key.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// 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'))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetLanguages
Table Row (tr)
idname
Table Cell (td)

getLanguages

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSDataSet
Span
stylefont-weight: bold;
getLanguages
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

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.

Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
JSDataSet - a JSDataSet with all the languages.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var set = i18n.getLanguages();
for(var i=1;i<=set.getMaxRowIndex();i++)
{
	application.output(set.getValue(i, 1) + " " + set.getValue(i, 2));
}
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetSystemMessages
Table Row (tr)
idname
Table Cell (td)

getSystemMessages

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSDataSet
Span
stylefont-weight: bold;
getSystemMessages
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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)
idret
Table Cell (td)

Returns

Div
classsIndent
JSDataSet - a JSDataSet with all the system messages.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
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));
}
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetTimeZoneOffset-String
Table Row (tr)
idname
Table Cell (td)

getTimeZoneOffset

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getTimeZoneOffset
Span
(timeZoneId)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns the offset (in milliseconds) of this time zone from UTC for the current date or at the specified date.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} timeZoneId - The time zone to get the offset for.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Number - an int representing the time zone's offset from UTC.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var timeZoneOffset = i18n.getTimeZoneOffset('America/Los_Angeles');
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetTimeZoneOffset-String_Date
Table Row (tr)
idname
Table Cell (td)

getTimeZoneOffset

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getTimeZoneOffset
Span
(timeZoneId, date)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns the offset (in milliseconds) of this time zone from UTC for the current date or at the specified date.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{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)
idret
Table Cell (td)

Returns

Div
classsIndent
Number - an int representing the time zone's offset from UTC.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var timeZoneOffset = i18n.getTimeZoneOffset('America/Los_Angeles');
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetTimeZones
Table Row (tr)
idname
Table Cell (td)

getTimeZones

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String[]
Span
stylefont-weight: bold;
getTimeZones
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns an array of known timezones.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String[] - an Array with all the timezones.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var timeZones = i18n.getTimeZones();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsetI18NMessage-String_String
Table Row (tr)
idname
Table Cell (td)

setI18NMessage

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
setI18NMessage
Span
(i18nKey, value)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} i18nKey - The message key
{String} value - They value for the message key.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
//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')
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsetLocale-String_String
Table Row (tr)
idname
Table Cell (td)

setLocale

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
setLocale
Span
(language, country)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

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)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} language - The lowercase 2 letter code
{String} country - The upper case 2 letter code.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
//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');
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsetTimeZone
Table Row (tr)
idname
Table Cell (td)

setTimeZone

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
setTimeZone
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// This will set the default time zone to Central European Time
i18n.setTimeZone("Europe/Amsterdam");
Table Row (tr)
classlastDetailRow
Table Cell (td)