marcoxz 0 Report post Posted April 3, 2008 Für die die es interessiert: http://forums.invisionize.com/Localize-Dat...mp;hl=setlocale Ohne viel Aufwand Ciao Marco Share this post Link to post
Pinguin2000 0 Report post Posted April 3, 2008 kann das jemand mal bitte übersetzen oder die bearbeiteten files hier hochladen ? ich verstehe da nur bahnhof :( Share this post Link to post
Stefan 0 Report post Posted April 3, 2008 Zunächst mal, prüfe ob dein Webhoster die Funktion anbietet und welche Einstellun bevorzugt wird. Dazu lade folgende PHP Datei auf deinen Webspace auf und rufe diese auf. <?php $loc_de = setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge'); echo "Preferred locale for german on this system is '$loc_de'";?> ?> Anschließend kannst du mit der richtigen Einstellung, die dir dort ausgegeben wird, prüfen, ob es wirklich klappt. Hierfür das de_DE mit dem richtigen Parameter (falls unterschiedlich) bei setlocale ändern. <?php setlocale(LC_ALL, 'de_DE'); echo strftime("%A %d %B %Y", time()); ?> Für Version 2.1 Datei init.php Suche: error_reporting (E_ERROR | E_WARNING | E_PARSE); Füge darunter ein (Parameter ggf. ändern): setlocale(LC_ALL, 'de_DE'); Datei sources/ipsclass.php Suche: $this->today_time = gmdate('d,m,Y', ( time() + $this->offset) ); $this->yesterday_time = gmdate('d,m,Y', ( (time() - 86400) + $this->offset) ); Ersetze durch: $this->today_time = strftime('%d,%m,%Y', ( time() + $this->offset) ); $this->yesterday_time = strftime('%d,%m,%Y', ( (time() - 86400) + $this->offset) ); Suche (3 mal): return gmdate($this->time_options[$method], ($date + $this->offset) ); Ersetze jeweils durch: return strftime($this->time_options[$method], ($date + $this->offset) ); Suche: $this_time = gmdate('d,m,Y', ($date + $this->offset) ); Ersetze durch: $this_time = strftime('%d,%m,%Y', ($date + $this->offset) ); Suche: if ( $this_time == $this->today_time ) { return str_replace( '{--}', $this->lang['time_today'], gmdate($this->vars['time_use_relative_format'], ($date + $this->offset) ) ); } else if ( $this_time == $this->yesterday_time ) { return str_replace( '{--}', $this->lang['time_yesterday'], gmdate($this->vars['time_use_relative_format'], ($date + $this->offset) ) ); } Ersetze durch: if ( $this_time == $this->today_time ) { return str_replace( '{--}', $this->lang['time_today'], strftime($this->vars['time_use_relative_format'], ($date + $this->offset) ) ); } else if ( $this_time == $this->yesterday_time ) { return str_replace( '{--}', $this->lang['time_yesterday'], strftime($this->vars['time_use_relative_format'], ($date + $this->offset) ) ); } Suche: return gmdate($method, ($date + $this->offset) ); Ersetze durch: return strftime($method, ($date + $this->offset) ); Datei sources/action_public/profile.php Suche: $info['local_time'] = $member['time_offset'] != "" ? gmdate( $this->ipsclass->vars['clock_long'], time() + ($member['time_offset']*3600) + ($this->ipsclass->vars['time_adjust'] * 60) ) : $this->ipsclass->lang['no_info']; Ersetze durch: $info['local_time'] = $member['time_offset'] != "" ? strftime( $this->ipsclass->vars['clock_long'], time() + ($member['time_offset']*3600) + ($this->ipsclass->vars['time_adjust'] * 60) ) : $this->ipsclass->lang['no_info']; Share this post Link to post
marcoxz 0 Report post Posted April 3, 2008 (edited) Ach ja das läuft so auch auf 2.3.4 In der profile.php muß zusätzlich noch diese Zeile: $member['_local_time'] = $member['time_offset'] != "" ? gmdate( $this->ipsclass->vars['clock_long'], time() + ($member['time_offset']*3600) + ($time_adjust * 60) ) : ''; Durch diese: $member['_local_time'] = $member['time_offset'] != "" ? strftime( $this->ipsclass->vars['clock_long'], time() + ($member['time_offset']*3600) + ($time_adjust * 60) ) : ''; ersetzt werden. Und dann noch: in der ipsclass.php müssen noch die anderen Datums formate also die mit % eingesetzt werden (sonst stimmen die Zeiten in der Profil ansicht nicht) also 'TINY' und 'DATE' //----------------------------------------- // Time options //----------------------------------------- $this->time_options = array( 'JOINED' => $this->vars['clock_joined'], 'SHORT' => $this->vars['clock_short'], 'LONG' => $this->vars['clock_long'], 'TINY' => isset($this->vars['clock_tiny']) ? $this->vars['clock_tiny'] : 'j M Y - G:i', 'DATE' => isset($this->vars['clock_date']) ? $this->vars['clock_date'] : 'j M Y', ); $this->num_format = ( $this->vars['number_format'] == 'space' ) ? ' ' : $this->vars['number_format']; Edited April 3, 2008 by marcoxz Share this post Link to post
marcoxz 0 Report post Posted April 3, 2008 GAAAANZ Wichtig nehmt nicht "LC_ALL" sondern "LC_TIME" sonst haben einige Plugins Probleme... z.B. D23 Google Member Maps... Share this post Link to post
Rüdiger 3 Report post Posted May 25, 2008 Hallo marcoxz, wo gibt es den den D23 mod? Danke Rüdiger Share this post Link to post