/** * Private internal helper for localization to the current user's locale * within OpenCms. <p> * * @return the current user's <code>Locale</code>. */ public Locale getLocale() { if (getSettings() == null) { return CmsLocaleManager.getDefaultLocale(); } return getSettings().getLocale(); }
/** * Private internal helper for localization to the current user's locale * within OpenCms. <p> * * @return the current user's <code>Locale</code>. */ public Locale getLocale() { if (getSettings() == null) { return CmsLocaleManager.getDefaultLocale(); } return getSettings().getLocale(); }
/** * Sets the locale of the current user.<p> * * @param locale the locale to set * * @throws CmsException in case the locale of the current user can not be stored */ public void setLocale(Locale locale) throws CmsException { CmsUserSettings settings = getSettings(); if (settings != null) { settings.setLocale(locale); settings.save(m_cms); m_messages = Messages.get().getBundle(locale); } }
/** * Sets the locale of the current user.<p> * * @param locale the locale to set * * @throws CmsException in case the locale of the current user can not be stored */ public void setLocale(Locale locale) throws CmsException { CmsUserSettings settings = getSettings(); if (settings != null) { settings.setLocale(locale); settings.save(m_cms); m_messages = Messages.get().getBundle(locale); } }