News module and language bugs (UTF-8)
News module and language bugs (UTF-8)
Could someone kindly tell me how to hack the news module to give working UTF-8 month names.
Many people have complained about this and people have filed bugs in the module forge. It hasn't been fixed despite the fact that the problem has existed for a long time (a year or more?). There are bug reports from 2006 in the forge. I can't imagine it's that hard to fix.
The problem is that month localizations in the news editor look like this "kes?kuu" when it should be "kesäkuu". That was an example using Finnish. Plenty of other languages are also affected.
I've spent quite a while trying to figure out the guts of the news module but I can't find a way to fix this. Could someone kindly help fix this. This is very annoying to the user but should be pretty trivial to fix.
Many people have complained about this and people have filed bugs in the module forge. It hasn't been fixed despite the fact that the problem has existed for a long time (a year or more?). There are bug reports from 2006 in the forge. I can't imagine it's that hard to fix.
The problem is that month localizations in the news editor look like this "kes?kuu" when it should be "kesäkuu". That was an example using Finnish. Plenty of other languages are also affected.
I've spent quite a while trying to figure out the guts of the news module but I can't find a way to fix this. Could someone kindly help fix this. This is very annoying to the user but should be pretty trivial to fix.
Re: News module and language bugs (UTF-8)
FIXED
I guess the problem wasn't with the news module itself.
Here's what I did. Open lib/smarty/internals/function.html_select_date.php
Change the line:
to
That fixes the problem. What previously happened was that the month name was in ISO-889... when the page itself was in UTF-8 causing the letter problems.
Thank you Hare, you rock
I guess the problem wasn't with the news module itself.
Here's what I did. Open lib/smarty/internals/function.html_select_date.php
Change the line:
Code: Select all
$month_names[$i] = strftime($month_format, mktime(0, 0, 0, $i, 1, 2000));
Code: Select all
$month_names[$i] = utf8_encode(strftime($month_format, mktime(0, 0, 0, $i, 1, 2000)));
Thank you Hare, you rock

Last edited by Hare on Sun Sep 16, 2007 7:19 pm, edited 1 time in total.
Re: News module and language bugs (UTF-8)
I just thought I'd bump this message because this thing is trivial to fix but may cause serious headache to people who need umlaut characters in the news module admin interface... I just installed 1.4.1 and noticed that this wasn't fixed...
Re: News module and language bugs (UTF-8)
Nice work Hare. Handy indeed.
Could someone add this change to the latest revision/for next release?
Could someone add this change to the latest revision/for next release?
Re: News module and language bugs (UTF-8)
It seems this still is relevant. I try to modify the file but seems that it didnt work anymore.
Re: News module and language bugs (UTF-8)
On what release are you reporting this, and could you describe a test-case if it is on latest....
Ronny
Ronny
Re: News module and language bugs (UTF-8)
Ouh sorry. Im pretty new with this.
The month in news module is corrupted with language Finnish.
CMS Version
1.6
I did a "default" install from shell.
Changed default language for the frontend to Suomi|Finnish.
Also tried to modify that function.html_select_date.php file under lib/smarty/plugins.
Attached picture what Im meaning. It should be kesä or kesäkuu
The month in news module is corrupted with language Finnish.
CMS Version
1.6
I did a "default" install from shell.
Changed default language for the frontend to Suomi|Finnish.
Also tried to modify that function.html_select_date.php file under lib/smarty/plugins.
Attached picture what Im meaning. It should be kesä or kesäkuu
Last edited by olsmondi on Fri Jun 26, 2009 9:05 pm, edited 1 time in total.
Re: News module and language bugs (UTF-8)
Posting to revitalize this thread, which I see important:
I'm having same problem as olsmondi, or atleast I think I am.
I'm running on v.1.7 and my news shows date like this (frontend on Finnish)

So where does the strange mark come from? This screencapture is from firefox, IE and Opera show a different symbol.
Thanks guys!
I'm having same problem as olsmondi, or atleast I think I am.
I'm running on v.1.7 and my news shows date like this (frontend on Finnish)

So where does the strange mark come from? This screencapture is from firefox, IE and Opera show a different symbol.
Thanks guys!
Re: News module and language bugs (UTF-8)
I don't think that it's need to change the php-file - this should fix the problem:
in the config php you can find this (in my example it's for german) at Locale/encoding Settings:
change the line to
you have to put ".UTF8" behind the language
in the config php you can find this (in my example it's for german) at Locale/encoding Settings:
Code: Select all
$config['locale'] = 'de_DE';
Code: Select all
$config['locale'] = 'de_DE.UTF8';
Re: News module and language bugs (UTF-8)
Well that was fast! Many thanks owr_web for that advice, it did the trick!