1

Renderer GetLocaleSettings API

Тема: Renderer GetLocaleSettings API

Hi Support,

API render/set_locale will set the locale settings

Similar to this API, is there any API to get the current renderer locale settings ? I want to fetch the current language, datetime format etc

Also can you clarify whether these settings are stored in user or account(resource) item ?

Thanks

2

Renderer GetLocaleSettings API

Re: Renderer GetLocaleSettings API

karthik, there is no such request for renderer now.
Request render/set_locale is only for applying user's localization parameters to renderer of current session. It means that after logout this setting is cleared.
There are special requests for getting/setting localization paramenters for user: user/get_locale, user/update_locale.
These requests are for storing user's first day of week, date and time format.
User's language is stored in browser cookie after authorization and is copied to user's custom property "lang".
User's timezone and DST (daylight saving time) is strored in user's custom property "tz".
User's measurement system setting (metric units, US units, imperial units) can be updated with the help of item/update_measure_units request. Current value of user's measurement system is returned in response of login request in "mu" property of user. Also it can be get in responce of core/search_item request.
So all these parameters are stored in user and need to be passed into render/set_locale request after login for correct formatting of data returned from server. Thus there is no great need of render/get_locale request.
But we'll consider adding some option/parameter to pass to render/set_locale request which will say to take user's localization parameters on server side for better convenience.

Head of Wialon Local Department
Gurtam