public Locale getLocation() {
Locale locale = null;
try {
XMultiComponentFactory xMCF = m_xContext.getServiceManager();
Object oConfigurationProvider = xMCF.createInstanceWithContext("com.sun.star.configuration.ConfigurationProvider", m_xContext);
XLocalizable xLocalizable = (XLocalizable) UnoRuntime.queryInterface(XLocalizable.class, oConfigurationProvider);
locale = xLocalizable.getLocale();
} catch (Exception ex) {
System.err.println("Exception in Gui.getLocation(). Message:\n" + ex.getLocalizedMessage());
}
return locale;
}