Page 1 of 1

Date in french format

Posted: Thu Aug 19, 2004 6:12 pm
by Gorrünwe
Does anyone know how to put the date in french format (ie: make python to recognize the locale variable as fr_FR)? Thanks!

Posted: Fri Aug 20, 2004 4:46 am
by dandandaman
the date? where exactly does this appear ... in the dynamic news stuff? Last I checked cvs just displayed something like "This story first broadcast on:" and then the timestamp. Is this string what you mean? :-)

Dan.a

Posted: Fri Aug 20, 2004 7:03 am
by Gorrünwe
yes sir! :D

Posted: Fri Aug 20, 2004 7:48 am
by dandandaman
well, that text is in dynamic_news.py if you just want to modify the string...... but I don't know how to do locale stuff in python, so I could probably move it into dynamic_news_content.py if you want. :-) Will this be good enough?

Dan.a

Posted: Fri Aug 20, 2004 7:53 am
by Gorrünwe
actually, i find a "brutal" solution, but i would prefer an "official" one:
my solution consists in:
1) reorganise the different strings in a "french order": day month year, hour:min:sec
2) make a function that translates the english months in the french months

If i can't find a "clean" solution, i'll keep this one... :?

Posted: Fri Aug 20, 2004 8:14 am
by dandandaman
ah....you're not working off cvs then.

In cvs, the data format has been changed to just the timestamp. ie you get this now:

"This story first broadcast on: 220.12345975"

or whatever ...... as the date stuff was going to me implemented in c++ code properly (as opposed to my hacked version ;-) )......this may or may not be the case any longer (the devel who was going to do this has disappeared), but the next release may have this format instead of the old one. So all that will need to be changed is "This story first....etc" :-)

Otherwise, the 'locale' modules has names for days, months etc for different locales, although I've never used this before. :-)

Dan.a

Posted: Fri Aug 20, 2004 8:26 am
by Gorrünwe
dandandaman wrote:"This story first broadcast on: 220.12345975"
Will the date always still in this format, later? I don't understand your explainations...

Posted: Sat Aug 21, 2004 10:19 am
by dandandaman
At this stage, the next release will have this format.

It will be altered after the next release.

If this plan changes, I'll let you know. :-)

Dan.a