I need to programmatically get the default locale for a site. So I:
- creata a new site with default language set to english (en_us)
- create a second site with default languge set to german (de_DE)
In my code I've tried to do the following:
CompanyThreadLocal.setCompanyId(portletDataContext.getCompanyId());
final Locale locale = LocaleUtil.getDefault();
But I get "en_us" for both sites, which is the portal default locale.
I need this in my export/import functions of my PortletDataHandler
implementation. Otherwise I will allways export my data with the wrong default language from staging to live.
I'm running Liferay 6.1.20 EE.
Thanks in advance, Fabi