[opencms-dev] Change Locale to en_GB for the workplace explorer

Graeme Kidd coolkidd3 at hotmail.com
Wed Jan 20 01:01:59 CET 2010


Hi,

I was wondering if it was possible to change the locale of the workspace
explorer from "en" to "en_GB". This then ensures the dates appear as
"dd/mm/yyyy". Changing the locale in opencms-system.xml didn't do anything:

<internationalization>
  <localehandler class="org.opencms.i18n.CmsDefaultLocaleHandler"/>
  <localesconfigured>
    <locale>en_GB</locale>
    <locale></locale>
  </localesconfigured>
  <localesdefault>
    <locale>en_GB</locale>
    <locale></locale>
  </localesdefault>
</internationalization>

Looking in the opencms.log shows that the workspace is still use "en":
19 Jan 2010 21:10:02,527  INFO [.workplace.CmsWorkplaceManager:1323] .
Workplace init       : Default locale is "en"

While the i18n defualt is now "en_GB":
19 Jan 2010 21:10:02,231  INFO [.opencms.i18n.CmsLocaleManager: 385] . i18n
configuration   : default locale 1 is en_GB

So far I seem to have been able to hard code the "en_GB" by changing the
"setLocale" method in the CmsMessages class to this:
protected void setLocale(Locale locale) {
    //m_locale = locale;
    m_locale = Locale.UK;
}

Does anyone how I can get the same effect without having to edit the source
code?

Thanks






More information about the opencms-dev mailing list