Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
6 subscribers
Views
2642 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Try to get the primary locale of the system
Stefan Helzle
A Score Level 3
over 8 years ago
I am working on replacing an old plugin which uses deprecated API. In case the user did not set any preferences for his locale
UserProfileService.getUser(context).getLocale()
returns NULL. The old code is
if (locale == null) {
locale = AdministrationService.getSiteLocaleSettings().getPrimaryLocale();
}
Now the AdministrationService is deprecated. How do I get the system locale using current API calls? I did not find anything in the API docs.
OriginalPostID-241441
Discussion posts and replies are publicly visible
Parents
0
Vinod Bongoni
Certified Lead Developer
over 8 years ago
Try to use ServiceContextFactory to get the administrator user or context and then use getLocale() method.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Vinod Bongoni
Certified Lead Developer
over 8 years ago
Try to use ServiceContextFactory to get the administrator user or context and then use getLocale() method.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data