Guest thewiseoldman Posted September 28, 2004 Share Posted September 28, 2004 Please add this feature, with the possibility to edit the locale via the ACP, using setlocale. At worst if the locale is not installed on the server, the date will remain in english. Link to comment Share on other sites More sharing options...
Dlf Posted September 29, 2004 Share Posted September 29, 2004 Can you expalin more? Link to comment Share on other sites More sharing options...
JasonS Posted September 29, 2004 Share Posted September 29, 2004 Aren't all the dates already localized as per the setting in the user's user cp? Link to comment Share on other sites More sharing options...
iTalker Posted September 29, 2004 Share Posted September 29, 2004 Yes that's really needed for boards that use another language than english. :) Link to comment Share on other sites More sharing options...
marcoos Posted January 5, 2005 Share Posted January 5, 2005 I would like to ask if there is any progress with this suggestion. Setlocale will be incredibly useful for all non-english boards Link to comment Share on other sites More sharing options...
Hancoque Posted January 6, 2005 Share Posted January 6, 2005 In lang_global.php days and months can be translated for the calender. Maybe these entries could also be used. Link to comment Share on other sites More sharing options...
DukeDW Posted January 7, 2005 Share Posted January 7, 2005 I thought that the language packs took care of this feature. Link to comment Share on other sites More sharing options...
Hancoque Posted January 7, 2005 Share Posted January 7, 2005 Nope, I assumed that too before I started working on a German language pack. But it isn't the case. Link to comment Share on other sites More sharing options...
Oncle Tom Posted January 12, 2005 Share Posted January 12, 2005 Nope, language pack do this for calendar or other tweaks. The date in topics is based upon the gmdate() function (derived from date()) but it is english-only, whatever your setlocale() is. If i want to display the time in the correct language, we need to edit some files to modify functions and some other things ... each time, it's verry annoying, especially if we think that the strftime() (localized time display) was in use in IPB 1.3 (or just before, in the 1.2). As language packs option is available, it's a bit curious not to do it right to the end. Link to comment Share on other sites More sharing options...
Guest thewiseoldman Posted January 12, 2005 Share Posted January 12, 2005 This suggestion has been approuved long time ago I don't know why it is not in the code yet :'( Maybe customers not speaking english are not so important for IPS... gmdate is used for long, I changed it to gmstrftime to localize the date within the french version of IPB 1.1.2 Link to comment Share on other sites More sharing options...
-s- Posted February 2, 2005 Share Posted February 2, 2005 I sent a support ticket about this problem when 2.0customer release was released. I did get answers very quickly, first one said it Link to comment Share on other sites More sharing options...
GiDEoN_82 Posted February 2, 2005 Share Posted February 2, 2005 should be possible with 'hacking' the code... Link to comment Share on other sites More sharing options...
Oncle Tom Posted February 3, 2005 Share Posted February 3, 2005 should be possible with 'hacking' the code...<{POST_SNAPBACK}> Just open your eyes and look above : hacking the code is the only way to have a full translation. Localisations are not full and nothing is done to improve it ... except words and words. Link to comment Share on other sites More sharing options...
Guest thewiseoldman Posted February 3, 2005 Share Posted February 3, 2005 should be possible with 'hacking' the code...<{POST_SNAPBACK}> It is possible and really easy to add, there are at least two ways, via language pack or via setlocale(). Link to comment Share on other sites More sharing options...
marcoos Posted February 5, 2005 Share Posted February 5, 2005 Becouse it seems that we wont get any answer from Invision team, here is a small diff: --- functions.php.org 2005-02-05 01:01:55.781250000 +0100 +++ functions.php 2005-02-05 01:08:29.296875000 +0100 @@ -1838,15 +1838,35 @@ } else { - return gmdate($this->time_options[$method], ($date + $this->offset) ); + $date = gmdate($this->time_options[$method], ($date + $this->offset) ); + return $this->translate_date($date); } } else { - return gmdate($this->time_options[$method], ($date + $this->offset) ); + $date = gmdate($this->time_options[$method], ($date + $this->offset) ); + return ($method == 'LONG') ? $date : $this->translate_date($date); } } - +function translate_date($date) + { + global $ibforums; + $eng_long_months = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); + for($i = 1; $i <= 12; $i++) $local_long_months[] = $ibforums->lang["M_$i"]; + $date = str_replace($eng_long_months, $local_long_months, $date); + $eng_short_months = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); + for($i = 1; $i <= 12; $i++) $local_short_months[] = substr($ibforums->lang["M_$i"], 0, 3); + $date = str_replace($eng_short_months, $local_short_months, $date); + + $eng_long_days = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); + for($i = 0; $i <= 6; $i++) $local_long_days[] = $ibforums->lang["D_$i"]; + $date = str_replace($eng_long_days, $local_long_days, $date); + $eng_short_days = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); + for($i = 0; $i <= 6; $i++) $local_short_days[] = substr($ibforums->lang["D_$i"], 0, 3); + $date = str_replace($eng_short_days, $local_short_days, $date); + return $date; + } + /*-------------------------------------------------------------------------*/ // Returns the time - tick tock, etc /*-------------------------------------------------------------------------*/ It shoud be applied on sources/functions.php It's not a very clean solution but it works. After appying the path you should change date format in acp to something similar to: j F Y - H:i instead of jS F Y - h:i A. (S - adds "nd" "st" and so on ; H instead of h to 24h format) Link to comment Share on other sites More sharing options...
Oncle Tom Posted February 5, 2005 Share Posted February 5, 2005 Arf, there is a better way (and you should use the strftime() instead, for non english user it's better) which is already used while awaiting for an official issue ... Link to comment Share on other sites More sharing options...
qlas Posted February 6, 2005 Share Posted February 6, 2005 IPB has already some good features concerning languages. But there is still some work to do: e.g. date and custom profile fields on registration form and topic view. For our customers improvements in these fields would be a necessary condition for buying IPB. ;) I'm looking forward to seeing further action from IPB developpers soon. Link to comment Share on other sites More sharing options...
Oncle Tom Posted April 22, 2005 Share Posted April 22, 2005 Localized dates would be considerated for IPB 2.1 ? It's not such a huge change to do compared to other overhauls already done. Link to comment Share on other sites More sharing options...
Fabien Posted July 22, 2005 Share Posted July 22, 2005 This function will be added for IPB 2.1? Link to comment Share on other sites More sharing options...
Christian Arnold Posted September 2, 2005 Share Posted September 2, 2005 This function will be added for IPB 2.1? Any news for this topic? Link to comment Share on other sites More sharing options...
tom-riddle Posted September 2, 2005 Share Posted September 2, 2005 I don't remember reading any mention about this feature being in 2.1. It's an issue for me too and I think it should be added. IPS competitors already have it. "That open-source board", for example, has implemented this feature at least three years ago... Link to comment Share on other sites More sharing options...
Michael Posted September 2, 2005 Share Posted September 2, 2005 I helped someone out with this here before and published my changes that would be needed to the code over at Invisionize. You could try these steps to see if they work for you if this feature doesn't get added sometime soon.http://forums.invisionize.com/index.php?showtopic=83455 Link to comment Share on other sites More sharing options...
Suyu Posted September 3, 2005 Share Posted September 3, 2005 Well I think suggestions are closed for version 2.1 :( :'( Link to comment Share on other sites More sharing options...
ChrisA Posted September 3, 2005 Share Posted September 3, 2005 "That open-source board", for example, has implemented this feature at least three years ago... It's hardly a very nice user friendly implementation though is it - having an administrator managed list which users can select from would be much more user friendly IMHO. Link to comment Share on other sites More sharing options...
tom-riddle Posted September 3, 2005 Share Posted September 3, 2005 marcoos: Thanks, I'll try that out! ^_^ It's hardly a very nice user friendly implementation though is it [...] The only thing you need to do is translate the strings in the language file. Friendly enough, if you ask me. IPB already have this information on lang_global.php. As marcoos' post shows, it's just a matter of replacing the names and you're done.[...] having an administrator managed list which users can select from would be much more user friendly IMHO. Sorry, could you explain this further? I didn't understand your suggestion... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.