![]() |
How to translate month? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: How to translate month? (/showthread.php?tid=79149) |
How to translate month? - sfarzoso - 04-29-2021 I have this date 3/2021, and I'm trying to translate March into "Marzo", so I did: PHP Code: <?= DateTime::createFromFormat('m-Y', $d->date)->format(lang('date.month', ['F']) . '/Y') ?> locale file: PHP Code: <?php how can I show "Marzo"? RE: How to translate month? - wdeda - 04-29-2021 I use the example below, in a help, for the Portuguese: PHP Code: setlocale(LC_TIME, 'pt', 'portuguese'); |