<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Try to get the primary locale of the system</title><link>https://community.appian.com/discussions/f/plug-ins/8643/try-to-get-the-primary-locale-of-the-system</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Try to get the primary locale of the system</title><link>https://community.appian.com/thread/38227?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2016 14:15:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d78c3ed6-6b7e-4e08-b006-085e84101220</guid><dc:creator>Stefan Helzle</dc:creator><description>There is no public API available that replaces the AdministrationService. I will raise a ticket to bring some awareness to it.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Try to get the primary locale of the system</title><link>https://community.appian.com/thread/38203?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2016 22:10:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:40092ec9-0d88-4a53-8693-c0bc19b2462d</guid><dc:creator>chetany</dc:creator><description>I think you can use com.appiancorp.suiteapi.portal.GlobalizationService. It has the same method getSiteLocaleSettings(). This service is not yet deprecated.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Try to get the primary locale of the system</title><link>https://community.appian.com/thread/38193?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2016 21:08:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0ec53f54-d9e4-41e3-8009-34f13ce85115</guid><dc:creator>Stefan Helzle</dc:creator><description>Hm ... this might work, but I would like to implement to most &amp;quot;official&amp;quot; way of doing that. The expression userlocale() can do it. But that does not help me in Java code.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Try to get the primary locale of the system</title><link>https://community.appian.com/thread/38190?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2016 20:51:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:89c52210-140c-4c78-a4d0-7848d4deed3d</guid><dc:creator>Vinod Bongoni</dc:creator><description>Try to use ServiceContextFactory to get the administrator user or context and then use getLocale() method.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>