Hancoque Posted September 3, 2005 Share Posted September 3, 2005 I guess the best way to provide localized dates is to translate days and months via language packs. Then it's assured that a user alsways has a date string according to his/her chosen forum language. The basic format is set in the ACP as it is now but certain parts (like d, l, F, M) are translated by the language pack. That should be no problem to implement and older language packs where the date strings are missing just use the default (English) strings. Example: You define the following date format in the ACP: l, j. F, Y Then it would look like this: Monday, 31. March, 2006 We see, that there's l and F in the string, which are then translated by the language pack: Montag, 31. M Link to comment Share on other sites More sharing options...
ChrisA Posted September 3, 2005 Share Posted September 3, 2005 Sorry, could you explain this further? I didn't understand your suggestion... Quite simple really - the administrator creates a list in the AdminCP of date and time display formats - for example:July 31, 2005 31/07/2005 07.31.05 Saturday 31 July 2005 etc. This would then be a drop down list in the UserCP under board settings for how they wanted dates to be displayed. Different languages do present certain problems I believe, as the date() function used to generate these dates I believe always uses the servers local default language :unsure: Link to comment Share on other sites More sharing options...
Oncle Tom Posted December 7, 2006 Share Posted December 7, 2006 I re-up this topic because it is a long time requested option which could be easily integrated.What is needed to change is very simple and could avoid custom file modifications at every upgrade :1) switching gmdate() to gmstrftime() in profile.php , ipsclass.php and admin_functions.php2) adding a setlocale IPB option in Time & Date formats which could be set to 'en' by default.3) replacing date() formating by strftime() formatingOne change, everybody's happy ^^ Link to comment Share on other sites More sharing options...
Bluedeep Posted March 24, 2008 Share Posted March 24, 2008 Up, and please add setlocale() Tnx Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.