[opencms-dev] OpenCms 6 a 2 - I18N - Workplace Locale Country enGB

Mike Bachrynowski mikeb at tableau.co.uk
Mon Nov 29 15:47:26 CET 2004


Thanks

How hard would it be to set up a preference file date display property
(the character string for SimpleDateFormat)?  I believe many non
technical content editors would prefer to see user customisable
"display" formats of "Wed 1 Dec" instead of "12/01/04".  IMO they like
to see the day of week listed.

Maybe as a simple interim fix we do not need to allow individual user
choice perhaps a general property.
Then only the coupl of methods that retrieves and formats the date need
amending., 

I suggest in "webapps/opencms/config/opencms-workplace.xml" is added

<opencms>
<workplace>
<defaultfiledatedisplay>E dd MMM yyyy HH:mm:ss
Z</defaultfiledatedisplay>


Regards

Mike

 

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Alexander Kandzior
Sent: 29 November 2004 14:26
To: 'The OpenCms mailing list'
Subject: RE: [opencms-dev] OpenCms 6 a 2 - I18N - Workplace Locale
Country enGB

The workplace locales are currently not in any property or XML file, but
you
have to create a new folder with the name of the locale (e.g. en_GB) in
the
/system/workplace/locales/ folder. 

Howerver, I just found out that the implementation only used the
language
and not the country variant. I fixed this in CVS so it will be available
in
the next download release.

Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com

 

> -----Original Message-----
> From: opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Mike 
> Bachrynowski
> Sent: Monday, November 29, 2004 2:13 PM
> To: The OpenCms mailing list
> Subject: [opencms-dev] OpenCms 6 a 2 - I18N - Workplace 
> Locale Country en GB
> 
> I would like to set the workplace "explorer_files.jsp" etc to 
> correctly display the dates (date last modified, dates 
> released, date modified
> etc) in the United Kingdom format i.e. "dd/mm/yy" not the 
> United States format of "mm/dd/yy".
> 
> I have tried variants of
> "webapps/opencms/config/opencms-system.properties"
> 
> "en", "en-GB", "en_GB", "gb" ... 
> 
> <internationalization> 	
> <localehandler class="org.opencms.i18n.CmsDefaultLocaleHandler"/>	
> <localesconfigured>
> <locale>en</locale>
> <locale>de</locale>
> </localesconfigured>
> <localesdefault>
> <locale>en</locale>
> <locale>de</locale>		
> </localesdefault>
> 
> The results in the log are
> 2004-11-29 12:34:20,074 INFO  (main:) [org.opencms.init] . i18n
> configuration   : starting
> 2004-11-29 12:34:20,074 INFO  (main:) [org.opencms.init] . i18n
> configuration   : starting
> 2004-11-29 12:34:20,084 INFO  (main:) [org.opencms.init] . i18n
> configuration   : locale handler is
> org.opencms.i18n.CmsDefaultLocaleHandler
> 2004-11-29 12:34:20,084 INFO  (main:) [org.opencms.init] . i18n
> configuration   : locale handler is
> org.opencms.i18n.CmsDefaultLocaleHandler
> 2004-11-29 12:34:20,084 INFO  (main:) [org.opencms.init] . i18n
> configuration   : adding locale en_GB
> 2004-11-29 12:34:20,084 INFO  (main:) [org.opencms.init] . i18n
> configuration   : adding locale en_GB
> 2004-11-29 12:34:20,084 INFO  (main:) [org.opencms.init] . i18n
> configuration   : adding locale en
> 2004-11-29 12:34:20,084 INFO  (main:) [org.opencms.init] . i18n
> configuration   : adding locale en
> 2004-11-29 12:34:20,084 INFO  (main:) [org.opencms.init] . i18n
> configuration   : adding locale de
> 2004-11-29 12:34:20,084 INFO  (main:) [org.opencms.init] . i18n
> configuration   : adding locale de
> 2004-11-29 12:34:20,094 INFO  (main:) [org.opencms.init] . i18n
> configuration   : default locale 1 is en_GB
> 2004-11-29 12:34:20,094 INFO  (main:) [org.opencms.init] . i18n
> configuration   : default locale 1 is en_GB
> 2004-11-29 12:34:20,094 INFO  (main:) [org.opencms.init] . i18n
> configuration   : default locale 2 is de
> 2004-11-29 12:34:20,094 INFO  (main:) [org.opencms.init] . i18n
> configuration   : default locale 2 is de
> 2004-11-29 12:34:20,104 INFO  (main:) [org.opencms.init] . i18n
> configuration   : finished
> 2004-11-29 12:34:20,104 INFO  (main:) [org.opencms.init] . i18n
> configuration   : finished
> ....
> ....
> ....
> 2004-11-29 12:34:20,835 INFO  (main:) [org.opencms.init] . Workplace
> init       : Default locale is 'en'
> 2004-11-29 12:34:20,835 INFO  (main:) [org.opencms.init] . Workplace
> init       : Default locale is 'en'
> 
> In checking the code
> CmsExplorer .... 
> if (showDateLastModified) {
>  content.append("\"");
>  
> content.append(getSettings().getMessages().getDateTime(res.get
> DateLastMo
> dified()));
>  content.append("\",");
> 
> CmsWorkplace invokes CmsLocaleManager / 
> CmsDefaultLocaleHandler etc ...
> 
> I could hack the code to force through a SimpleDateFormat 
> ....but is there an easier way.
> 
> 
> My workstation XP and browser IE v6 are set to locale "en-GB".
> 
> 
> I must be missing something. Any help would be appreciated.
> 
> Thanks
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list To 
> change your list options, or to unsubscribe from the list, 
> please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> 
> 



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





More information about the opencms-dev mailing list