Is it possible to get Studio Pros language setting from Plugable widget?

0
I am creating a custom calendar widget? I want to show different date format by Studio Pro’s language setting. Is it possible to get out Studio Pro’s language setting from Widget(TypeScript)?  Thanks.
asked
2 answers
0

You cannot retrieve the default language setting from the Client API, you can however retrieve the default language using CommunityCommons action “GetDefaultLanguage” and pass that to your widget instead.

answered
0

I believe if you use date attributes in a pluggable widget, the formatter property of the attribute will have the appropriate date format for the user’s locale.

Also, while the date format isn’t in the public client API, you can still get to it at:

mx.session.sessionData.locale.patterns

That API is subject to change of course but it has been stable for a little while.

answered