{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:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[String]\[]{td}{td}[#getAvailableTimeZoneIDs]\()
Get the list of available time zones.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getCountries]\()
Gets the list of countries available for localization{td}{tr}{tbody}{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 time zone 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)
Gets the real message (for the clients locale) for a specified message key.{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]\(timeZoneId)
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}[Number]{td}{td}[#getTimeZoneOffset]\(timeZoneId, 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}[#setLocale]\(language, country)
Set/Overwrite the locale for this client.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setTimeZone]\()
Sets the current time zone of the client.{td}{tr}{tbody}{table}\\
{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getAvailableTimeZoneIDs|class=node}{tr:id=name}{td}h6.getAvailableTimeZoneIDs{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getAvailableTimeZoneIDs{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getAvailableTimeZoneIDs_des|trigger=button|text=}{sub-section}{sub-section:getAvailableTimeZoneIDs_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getAvailableTimeZoneIDs_snc|trigger=button|text=}{sub-section}{sub-section:getAvailableTimeZoneIDs_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getAvailableTimeZoneIDs_prs|trigger=button|text=}{sub-section}{sub-section:getAvailableTimeZoneIDs_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getAvailableTimeZoneIDs_ret|trigger=button|text=}{sub-section}{sub-section:getAvailableTimeZoneIDs_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getAvailableTimeZoneIDs_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAvailableTimeZoneIDs_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getAvailableTimeZoneIDs_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAvailableTimeZoneIDs_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getAvailableTimeZoneIDs_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAvailableTimeZoneIDs_sam|trigger=none}{code:language=javascript}
//Get the list of available time zones
var timezones = i18n.getAvailableTimeZoneIDs();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getCountries|class=node}{tr:id=name}{td}h6.getCountries{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getCountries{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getCountries_des|trigger=button|text=}{sub-section}{sub-section:getCountries_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getCountries_snc|trigger=button|text=}{sub-section}{sub-section:getCountries_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getCountries_prs|trigger=button|text=}{sub-section}{sub-section:getCountries_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getCountries_ret|trigger=button|text=}{sub-section}{sub-section:getCountries_ret|trigger=none|class=sIndent}[String]\[] -- a String array containing the available countries.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getCountries_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCountries_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getCountries_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCountries_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getCountries_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCountries_sam|trigger=none}{code:language=javascript}
i18n.getCountries()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getCurrentCountry|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getCurrentCountry_des|trigger=button|text=}{sub-section}{sub-section:getCurrentCountry_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getCurrentCountry_snc|trigger=button|text=}{sub-section}{sub-section:getCurrentCountry_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getCurrentCountry_prs|trigger=button|text=}{sub-section}{sub-section:getCurrentCountry_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getCurrentCountry_ret|trigger=button|text=}{sub-section}{sub-section:getCurrentCountry_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:getCurrentCountry_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCurrentCountry_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getCurrentCountry_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCurrentCountry_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getCurrentCountry_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCurrentCountry_sam|trigger=none}{code:language=javascript}
var currCountry = i18n.getCurrentCountry();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getCurrentLanguage|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getCurrentLanguage_des|trigger=button|text=}{sub-section}{sub-section:getCurrentLanguage_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getCurrentLanguage_snc|trigger=button|text=}{sub-section}{sub-section:getCurrentLanguage_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getCurrentLanguage_prs|trigger=button|text=}{sub-section}{sub-section:getCurrentLanguage_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getCurrentLanguage_ret|trigger=button|text=}{sub-section}{sub-section:getCurrentLanguage_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:getCurrentLanguage_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCurrentLanguage_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getCurrentLanguage_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCurrentLanguage_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getCurrentLanguage_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCurrentLanguage_sam|trigger=none}{code:language=javascript}
var currLang = i18n.getCurrentLanguage();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getCurrentTimeZone|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getCurrentTimeZone_des|trigger=button|text=}{sub-section}{sub-section:getCurrentTimeZone_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getCurrentTimeZone_snc|trigger=button|text=}{sub-section}{sub-section:getCurrentTimeZone_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getCurrentTimeZone_prs|trigger=button|text=}{sub-section}{sub-section:getCurrentTimeZone_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getCurrentTimeZone_ret|trigger=button|text=}{sub-section}{sub-section:getCurrentTimeZone_ret|trigger=none|class=sIndent}[String] -- a String representing the current time zone.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getCurrentTimeZone_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCurrentTimeZone_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getCurrentTimeZone_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCurrentTimeZone_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getCurrentTimeZone_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getCurrentTimeZone_sam|trigger=none}{code:language=javascript}
var currTimeZone = i18n.getCurrentTimeZone();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDefaultDateFormat|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getDefaultDateFormat_des|trigger=button|text=}{sub-section}{sub-section:getDefaultDateFormat_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDefaultDateFormat_snc|trigger=button|text=}{sub-section}{sub-section:getDefaultDateFormat_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getDefaultDateFormat_prs|trigger=button|text=}{sub-section}{sub-section:getDefaultDateFormat_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getDefaultDateFormat_ret|trigger=button|text=}{sub-section}{sub-section:getDefaultDateFormat_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:getDefaultDateFormat_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDefaultDateFormat_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDefaultDateFormat_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDefaultDateFormat_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDefaultDateFormat_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDefaultDateFormat_sam|trigger=none}{code:language=javascript}
var defaultDateFormat = i18n.getDefaultDateFormat();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDefaultNumberFormat|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getDefaultNumberFormat_des|trigger=button|text=}{sub-section}{sub-section:getDefaultNumberFormat_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDefaultNumberFormat_snc|trigger=button|text=}{sub-section}{sub-section:getDefaultNumberFormat_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getDefaultNumberFormat_prs|trigger=button|text=}{sub-section}{sub-section:getDefaultNumberFormat_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getDefaultNumberFormat_ret|trigger=button|text=}{sub-section}{sub-section:getDefaultNumberFormat_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:getDefaultNumberFormat_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDefaultNumberFormat_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDefaultNumberFormat_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDefaultNumberFormat_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDefaultNumberFormat_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDefaultNumberFormat_sam|trigger=none}{code:language=javascript}
var defaultNumberFormat = i18n.getDefaultNumberFormat();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getI18NMessage-String|class=node}{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){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getI18NMessage-String_des|trigger=button|text=}{sub-section}{sub-section:getI18NMessage-String_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getI18NMessage-String_snc|trigger=button|text=}{sub-section}{sub-section:getI18NMessage-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getI18NMessage-String_prs|trigger=button|text=}{sub-section}{sub-section:getI18NMessage-String_prs|trigger=none|class=sIndent}\{[String]} i18nKey -- The message key
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getI18NMessage-String_ret|trigger=button|text=}{sub-section}{sub-section:getI18NMessage-String_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:getI18NMessage-String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getI18NMessage-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getI18NMessage-String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getI18NMessage-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getI18NMessage-String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getI18NMessage-String_sam|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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getI18NMessage-String_ObjectArray|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getI18NMessage-String_ObjectArray_des|trigger=button|text=}{sub-section}{sub-section:getI18NMessage-String_ObjectArray_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getI18NMessage-String_ObjectArray_snc|trigger=button|text=}{sub-section}{sub-section:getI18NMessage-String_ObjectArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getI18NMessage-String_ObjectArray_prs|trigger=button|text=}{sub-section}{sub-section:getI18NMessage-String_ObjectArray_prs|trigger=none|class=sIndent}\{[String]} i18nKey -- The message key
\{[Object]\[]} dynamicValues -- Arguments array when using parameter substitution.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getI18NMessage-String_ObjectArray_ret|trigger=button|text=}{sub-section}{sub-section:getI18NMessage-String_ObjectArray_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:getI18NMessage-String_ObjectArray_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getI18NMessage-String_ObjectArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getI18NMessage-String_ObjectArray_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getI18NMessage-String_ObjectArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getI18NMessage-String_ObjectArray_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getI18NMessage-String_ObjectArray_sam|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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getLanguages|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getLanguages_des|trigger=button|text=}{sub-section}{sub-section:getLanguages_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getLanguages_snc|trigger=button|text=}{sub-section}{sub-section:getLanguages_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getLanguages_prs|trigger=button|text=}{sub-section}{sub-section:getLanguages_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getLanguages_ret|trigger=button|text=}{sub-section}{sub-section:getLanguages_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:getLanguages_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getLanguages_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getLanguages_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getLanguages_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getLanguages_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getLanguages_sam|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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getSystemMessages|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getSystemMessages_des|trigger=button|text=}{sub-section}{sub-section:getSystemMessages_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getSystemMessages_snc|trigger=button|text=}{sub-section}{sub-section:getSystemMessages_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getSystemMessages_prs|trigger=button|text=}{sub-section}{sub-section:getSystemMessages_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getSystemMessages_ret|trigger=button|text=}{sub-section}{sub-section:getSystemMessages_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:getSystemMessages_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getSystemMessages_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getSystemMessages_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getSystemMessages_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getSystemMessages_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getSystemMessages_sam|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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTimeZoneOffset-String|class=node}{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;}\(timeZoneId){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getTimeZoneOffset-String_des|trigger=button|text=}{sub-section}{sub-section:getTimeZoneOffset-String_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getTimeZoneOffset-String_snc|trigger=button|text=}{sub-section}{sub-section:getTimeZoneOffset-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getTimeZoneOffset-String_prs|trigger=button|text=}{sub-section}{sub-section:getTimeZoneOffset-String_prs|trigger=none|class=sIndent}\{[String]} timeZoneId -- The time zone to get the offset for.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getTimeZoneOffset-String_ret|trigger=button|text=}{sub-section}{sub-section:getTimeZoneOffset-String_ret|trigger=none|class=sIndent}[Number] -- an int representing the time zone's offset from UTC.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getTimeZoneOffset-String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTimeZoneOffset-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getTimeZoneOffset-String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTimeZoneOffset-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getTimeZoneOffset-String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTimeZoneOffset-String_sam|trigger=none}{code:language=javascript}
var timeZoneOffset = i18n.getTimeZoneOffset('America/Los_Angeles');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTimeZoneOffset-String_Date|class=node}{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;}\(timeZoneId, date){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getTimeZoneOffset-String_Date_des|trigger=button|text=}{sub-section}{sub-section:getTimeZoneOffset-String_Date_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getTimeZoneOffset-String_Date_snc|trigger=button|text=}{sub-section}{sub-section:getTimeZoneOffset-String_Date_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getTimeZoneOffset-String_Date_prs|trigger=button|text=}{sub-section}{sub-section:getTimeZoneOffset-String_Date_prs|trigger=none|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.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getTimeZoneOffset-String_Date_ret|trigger=button|text=}{sub-section}{sub-section:getTimeZoneOffset-String_Date_ret|trigger=none|class=sIndent}[Number] -- an int representing the time zone's offset from UTC.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getTimeZoneOffset-String_Date_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTimeZoneOffset-String_Date_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getTimeZoneOffset-String_Date_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTimeZoneOffset-String_Date_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getTimeZoneOffset-String_Date_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTimeZoneOffset-String_Date_sam|trigger=none}{code:language=javascript}
var timeZoneOffset = i18n.getTimeZoneOffset('America/Los_Angeles');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTimeZones|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getTimeZones_des|trigger=button|text=}{sub-section}{sub-section:getTimeZones_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getTimeZones_snc|trigger=button|text=}{sub-section}{sub-section:getTimeZones_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getTimeZones_prs|trigger=button|text=}{sub-section}{sub-section:getTimeZones_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getTimeZones_ret|trigger=button|text=}{sub-section}{sub-section:getTimeZones_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:getTimeZones_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTimeZones_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getTimeZones_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTimeZones_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getTimeZones_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTimeZones_sam|trigger=none}{code:language=javascript}
var timeZones = i18n.getTimeZones();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setI18NMessage|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setI18NMessage_des|trigger=button|text=}{sub-section}{sub-section:setI18NMessage_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setI18NMessage_snc|trigger=button|text=}{sub-section}{sub-section:setI18NMessage_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setI18NMessage_prs|trigger=button|text=}{sub-section}{sub-section:setI18NMessage_prs|trigger=none|class=sIndent}\{[String]} i18nKey -- The message key
\{[String]} value -- They value for the message key.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setI18NMessage_ret|trigger=button|text=}{sub-section}{sub-section:setI18NMessage_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setI18NMessage_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setI18NMessage_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setI18NMessage_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setI18NMessage_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setI18NMessage_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setI18NMessage_sam|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
//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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setLocale|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setLocale_des|trigger=button|text=}{sub-section}{sub-section:setLocale_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setLocale_snc|trigger=button|text=}{sub-section}{sub-section:setLocale_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setLocale_prs|trigger=button|text=}{sub-section}{sub-section:setLocale_prs|trigger=none|class=sIndent}\{[String]} language -- The lowercase 2 letter code
\{[String]} country -- The upper case 2 letter code.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setLocale_ret|trigger=button|text=}{sub-section}{sub-section:setLocale_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setLocale_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setLocale_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setLocale_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setLocale_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setLocale_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setLocale_sam|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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setTimeZone|class=node}{tr:id=name}{td}h6.setTimeZone{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setTimeZone{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setTimeZone_des|trigger=button|text=}{sub-section}{sub-section:setTimeZone_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setTimeZone_snc|trigger=button|text=}{sub-section}{sub-section:setTimeZone_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:setTimeZone_prs|trigger=button|text=}{sub-section}{sub-section:setTimeZone_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:setTimeZone_ret|trigger=button|text=}{sub-section}{sub-section:setTimeZone_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setTimeZone_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setTimeZone_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setTimeZone_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setTimeZone_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setTimeZone_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setTimeZone_sam|trigger=none}{code:language=javascript}
// This will set the default time zone to Central European Time
i18n.setTimeZone("Europe/Amsterdam");
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
Cache
index
true
refresh
100d
showRefresh
true
id
doc
title
Refresh page
showDate
true
retry
Enable
servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClientservoy sSummary12%30%58%height: 30px;3Methods SummaryGet the list of available time zones.Gets the list of countries available for localizationGets 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 current time zone of the client; based on the current locale settings in the Servoy Client Locale preferences.Gets the date format from client (using client's locale).Gets the current default date format from server; based on the current admin settings.Gets the current default number format from server; based on the current admin settings.Gets the real message (for the clients locale) for a specified message key.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.Returns the offset (in milliseconds) of this time zone from UTC for the current date or at the specified date.Returns an array of known timezones.voidSets the value of i18n key for client scope,if value null the setting is removed.voidSet/Overwrite the locale for this client.voidSet/Overwrite the locale for this client.voidSets the current time zone of the client.functionservoy sDetail2100%height:30px2Methods DetailsgetAvailableTimeZoneIDsname
getAvailableTimeZoneIDs()
dessIndent
Get the list of available time zones.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowgetCountriesname
getCountries()
dessIndent
Gets the list of countries available for localization
ret
Returns
sIndent a String array containing the available countries.clients
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".