preferences.locale

Description

Provides methods to access and modify user locale information

Namespace:

preferences.locale

Method: listLocales

Description:

Returns a list of all understood locales. Can be used as input to setLocale.

Parameters:

Returns:

  • array :

    • string - Locale code.

Method: listTimeZones

Description:

Returns a list of all understood timezones. Results can be used as input to setTimeZone.

Parameters:

Returns:

  • array :

  • struct - timezone

    • int "time_zone_id" - Unique identifier for timezone.

    • string "olson_name" - Name as identified by the Olson database.

Method: setLocale

Description:

Set a user’s locale.

Parameters:

  • string sessionKey

  • string login - User’s login name.

  • string locale - Locale to set. (from listLocales)

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setTimeZone

Description:

Set a user’s timezone.

Parameters:

  • string sessionKey

  • string login - User’s login name.

  • int tzid - Timezone ID. (from listTimeZones)

Returns:

  • int - 1 on success, exception thrown otherwise.