View Issue Details

IDProjectCategoryView StatusLast Update
0003863mantisbtlocalizationpublic2011-08-05 02:20
ReporterSire Assigned Toatrol  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Summary0003863: [all lang] Date literals ("october") are always in english
Description

Date literals ("Oct", "October") are not using localization.

Here's the fix:

  • Change the print_date() function in date_api.php from using date() to using strftime() which supports localization. The problem here is that the date format syntax is different from the date() function, so the config files need to change. See: http://php.net/strftime

  • Add the locale string in the config -- or better, in the language file. (Swedish is either "swedish" or "sv-SE" for example).

  • Add a setlocale() call at the top of the print_date() function, or in some init function.

  • Now you just have to change all instances of date() where it's used to print out the date to print_date().
    (Mantis own print_date() is not used used consistently throughout Mantis, the regular date() is used a lot too!)

Approximate time to fix this bug: 12 min. :)

Additional Information

This bug is slightly related to 0001139.

TagsNo tags attached.

Relationships

related to 0001139 closedachumakov [all lang] date localisation 
has duplicate 0005356 closedachumakov Localization for Date fields 
related to 0006085 closedgrangeway Request to give user the option of using DATE() or GMDATE() as the underlying date function 

Activities

siebrand

siebrand

2008-10-08 06:04

reporter   ~0019515

Someone please provide a patch for this, so we can get it fixed... (yes, that is to you issue followers out there :P)

siebrand

siebrand

2009-07-06 19:10

reporter   ~0022433

Gimme patch, please!

atrol

atrol

2010-08-28 11:01

developer   ~0026493

Since version 1.2 date literals are localized