Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 12:25:43 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155473 Posts in 21708 Topics by 7734 Members
Latest Member: rofroodoOvego
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Datumsformat ändern in Version 2.7  (Read 426 times)
arytz

Offline Offline

Posts: 23


« on: December 18, 2008, 11:39:33 AM »

Ich möchte gerne den Standard der Datumsanzeige ändern können, geht aber nicht.

Momentane Anzeige:

12. Dec oder 12. December 2008 etc. statt

12. Dezember 2008

Also in deutscher Sprache. Die Spracheinstellungen habe ich bereits auf DE gesetzt, was aber nichts ändert.

Benutze Version 2.7

Weiss jemand weiter?
Logged
BerndJM

Offline Offline

Posts: 1764



« Reply #1 on: December 18, 2008, 12:14:48 PM »

Hi,

du weißt das es diese Einstellmöglichkeit zweimal gibt?
Einmal unter Optionen (allgemein gültig) und einmal unter Einstellungen (User bezogen).
Außerdem ignorieren manche Module schlichtweg die Formatangaben, je nachdem wie sie programmiert sind.

Grüßle Bernd
Logged

In theory, there is no difference between theory and practice. But, in practice, there is.
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2295



WWW
« Reply #2 on: December 18, 2008, 10:36:57 PM »

Most modules will use the php functions date() or gmdate() to format the dates.
This will always use English words in the dates.
The WB settings will allow you to change the order, but not the words used.

There is a solution, but you will need to change the module code to get it working.
If you are not yet scared off  smiley.. I will give an example below:


You will need to set the correct language once (could be done in the module, or in the template) using:
Code:
<?php setlocale(LC_TIME"de_DE"); ?>
Next you need to change the date() or gmdate() calls. They should become strftime() calls.

Example (from the news module)

Code:
$post_date = gmdate(DATE_FORMAT, $post['posted_when']+TIMEZONE);
should become
Code:
$post_date = strftime("%d. %B %Y",$post['posted_when']+TIMEZONE);
(note, this will not use the WB date format settings)

That will show the dates in the format and language you want.

Ruud
Logged

Professional WebsiteBaker Solutions
erpe

Offline Offline

Posts: 2077


WWW
« Reply #3 on: December 19, 2008, 12:35:03 AM »

Du kannst auch das hier benutzen:

http://www.websitebaker2.org/forum/index.php/topic,10786.msg63930.html#msg63930

Gruss

erpe
Logged

Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!