Child pages
  • i18n

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordList

...

SmartClientsWordList

...

WebClientsWordList

...

NGClientsWordList

...

MobileClient

 

...

servoy sSummary12%30%58%height: 30px;3Methods SummaryGet the list of available time zones.Gets the list of countries available for localizationGets the current country; 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 current default date format; based on the current locale settings in the Servoy Client Locale preferences.Gets the current default number format; based on the current locale settings in the Servoy Client Locale preferences.Gets the real message (for the clients locale) for a specified message key.Gets the real message (for the clients locale) for a specified message key.Returns a dataset with rows that contains a language key (en) and the displayname (English) column.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.voidSets the current time zone of the client.

 

...

functionservoy sDetail2100%height:30px2Methods DetailsgetAvailableTimeZoneIDsname

getAvailableTimeZoneIDs()

dessIndentGet the list of available time zones.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow getCountriesname

getCountries()

dessIndentGets the list of countries available for localizationret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getCurrentCountryname

getCurrentCountry()

dessIndentGets 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
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getCurrentLanguagename

getCurrentLanguage()

dessIndentGets 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
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
getCurrentTimeZonename

getCurrentTimeZone()

dessIndentGets 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
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getDefaultDateFormatname

getDefaultDateFormat()

dessIndentGets the current default date format; based on the current locale settings in the Servoy Client Locale preferences.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getDefaultNumberFormatname

getDefaultNumberFormat()

dessIndentGets the current default number format; based on the current locale settings in the Servoy Client Locale preferences.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getI18NMessagename

getI18NMessage(i18nKey)

dessIndentGets the real message (for the clients locale) for a specified message key.prs

Parameters

sIndenti18nKeyThe message key
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
getI18NMessagename

getI18NMessage(i18nKey, dynamicValues)

dessIndentGets 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
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
getLanguagesname

getLanguages()

dessIndentReturns 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
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getSystemMessagesname

getSystemMessages()

dessIndentReturns 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
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getTimeZoneOffsetname

getTimeZoneOffset(timeZoneId)

dessIndentReturns 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.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getTimeZoneOffsetname

getTimeZoneOffset(timeZoneId, date)

dessIndentReturns 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
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getTimeZonesname

getTimeZones()

dessIndentReturns an array of known timezones.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
setI18NMessagename

setI18NMessage(i18nKey, value)

dessIndentSets 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.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
setLocalename

setLocale(language, country)

dessIndentSet/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.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
setTimeZonename

setTimeZone(timezone)

dessIndentSets 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".prs

Parameters

sIndenttimezonethe client's time zone
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow