class CI_Calendar->get_month_name() - Wrong month name for month May - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: class CI_Calendar->get_month_name() - Wrong month name for month May (/showthread.php?tid=11243) |
class CI_Calendar->get_month_name() - Wrong month name for month May - El Forum - 09-01-2008 [eluser]fensen[/eluser] Detected in CodeIgniter_1.6.3 $month_names[5] has the same value both in month_type == 'short' and month_type == 'long'. Code: function get_month_name($month) According to "/language/xxx/calendar_lang.php", the long version should be 'cal_mayl' as follows: Code: if ($this->month_type == 'short') In English it's not a problem because the name of the month "May" is the same, short or long version. But in other languages it is an issue. Thanks Fabian class CI_Calendar->get_month_name() - Wrong month name for month May - El Forum - 09-01-2008 [eluser]xwero[/eluser] Nice catch but i think CI would be better off using the php functions set_locale and strftime. Then loading of a language file isn't needed to internationalize your app. Code: $display = ($this->month_type == 'short')?'%b':'%B'; |