I'm developing a multilingual site with a simple blog, where I've to display date field in multiple languages on the frontend.
I've set here the setlocale value: wire--modules--languagesupport--languagesupport-module to hu_HU.utf8
I've set the date format for all languages, it works.
I'm using the ProcessWire multi-language support modul
I realized that when I change language, everything is translated on the frontend, except date fields :S
The date fields language only depends on the logged in (or guest) users language, not on the choosed language...
And this is my problem.
My workaround is this, but do you have any better solution?
I've put this code to my head.inc template file.
switch($user->language->name) {
case 'default':
setlocale (LC_ALL, 'C');
break;
case 'hu':
setlocale (LC_ALL, 'hu_HU.utf8');
break;
case 'bg':
setlocale (LC_ALL, 'bg_BG.utf8');
break;
}
In this case I reached my goal, but I can not understand why is the setting in wire--modules--languagesupport--languagesupport-module.
It has no effect for the frontend...
Thank you for help!