I try to display a date in German but it doesn\'t work. I\'m using PHP with XAMPP.
These are my approaches:
function get_Datetime_Now() {
setlocale (
I just comment to thank Tim Bodeit, and if someone is looking to set the month in spanish, this is the code that worked to me:
setlocale(LC_TIME, 'es_ES', 'esp_esp');
You are probably using a windows machine which has different language codes in PHP than a Unix based one.
Try:
setlocale(LC_TIME, 'de_DE', 'deu_deu');
This will first try to set it to 'de_DE'
(Linux/Unix) and have the 'deu_deu'
code as a fallback for windows (PHP Version >= 4.3).
Example in the german PHP documentation
You can try with :
setlocale(LC_TIME, 'de_DE', 'de_DE.UTF-8');
echo strftime("%A, %d. %B %Y");
worked for me
The locale parameters are others compared linux to windows
See here:
Usually it's "DEU" or "GERMAN" under Win.