Welcome Guest, Not a member yet? Register   Sign In
Codeigniter calendar language problem

I'm trying to get the calendar in CodeIgniter to print month names in Polish.

In config.php I have this line:
$config ['language'] = 'polish';
In autoload.php I have this line:
$autoload ['language'] = array ('calendar');
In my controller:
$this->lang->load('calendar', 'polish');

So here I am trying to print the date:
echo mdate('%F');

The result is: August

Month names are printed in English, which is wrong, I want it in Polish. I have calendar_lang.php in Polish.

Any advice on how I solve this?
Please help...


because your server will probably be set to english-locale

Thanks. I use
but the function mdate(); doesn't work with setlocale() so I used strftime() but now I have problem with encoding because I don't have polish characters. Display text is in "ISO-8859-2" I need "UTF-8"?

Make sure you have the appropriate headers and/or meta data for displaying UTF-8 characters on the web. You might also need to wrap the results in utf8_encode(), but I would verify the former first.

Headers are ok. I do that and now is ok:
setlocale(LC_TIME, "polish");
echo iconv("ISO-8859-2","UTF-8",strftime('%B'));
Thanks for help

Theme © iAndrew 2016 - Forum software by © MyBB