Login





 


Language

Sprache auswählen:

Deutsch English

PostCalendar block displays month names in English Only?

PostCalendar 4.0 always displayes the English names of the months and days!? But the correct ones are written down in the translation-files (deu → German).

All translations are handled by the php strftime function in the templates and should translate it for you automatically as long as the _PC_LOCALE setting is set correctly in the global.php language file.
Now we need the correct locale settings which is not really obvious to find. By default _PC_LOCALE is set to “de_DE” for the german language which did not work on my system ( Windos XP, Apache, PHP 4.3.0).
I found a small script that works with PHP 4.3.0 to get the prefered LOCALE for german:

<?
/* try different possible locale names for german as of PHP 4.3.0 */
$loc_de = setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
echo "Preferred locale for german on this system is '$loc_de'";
?>

On my System it printed: “Preferred locale for german on this system is ‘German_Germany.1252’”

After reading this posts, I tried to make the same with spanish language, but I was unable to make it works because I have no programming knowlegdes, so I tried to write directly this: define(’_PC_LOCALE’,’Spanish_Spain.1252’); and I cannot believe it, but IT WORKS!!!! (I am using Apache, PHP and postnuke under Windows2k).

When I changed de_DE to German_Germany.1252 in {module_path}/pnlang/deu/global.php all my translation problems disappeared.

Somebody else reported that for french language changing fr_FR to fr_FR.iso885915@euro made the job (no plattform comment was given) and on a Windows system “Windows-1851” seems to work for cyrilic.

If you think you have set the right LOCALE and it is still not working there was a suggestion to modify the lang.xxx file in the conf directory of the templates. What changes have to be done were not mentioned, so I can’t jugde the effects and think this was only an idea.

Hope that will solve your prob.

Good luck

 
postcalendar_block_displays_month_names_in_english_only.txt · Last modified: 19.01.2006 20:42 by larsneo
 
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Driven by DokuWiki