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

Brabenetz, Harald harald.brabenetz at bearingpointconsulting.com
Wed Jan 20 08:54:51 CET 2010


Have you changed the default locale in opencms-workplace.xml?:

-----------------------------
<opencms>
  <workplace>
    <defaultlocale>en</defaultlocale>
    <localizedfolders>
      <resource uri="/system/workplace/"/>
      <resource uri="/system/login/"/>
    </localizedfolders>
        ...
        ...
        ...
-----------------------------

You can also change your personal default Local in the User-Preferences in OpenCms (first Tab).

With friendly regards,
Harald

-----Original Message-----
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Graeme Kidd
Sent: Mittwoch, 20. Jänner 2010 01:02
To: opencms-dev at opencms.org
Subject: [opencms-dev] Change Locale to en_GB for the workplace explorer

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




_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev

Infonova GmbH
Sitz: Unterpremstätten bei Graz
Firmenbuchgericht: Landesgericht für ZRS Graz
Firmenbuchnummer: FN 44354b



More information about the opencms-dev mailing list