Try to get the primary locale of the system

I am working on replacing an old plugin which uses deprecated API. In case the user did not set any preferences for his locale


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.


  Discussion posts and replies are publicly visible

Parents Reply Children
No Data