Preferred locale for German : setlocale « Utility Function « PHP






Preferred locale for German

 
<?php 
if($loc_de = setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'deu_deu')) { 
    echo "<p>Preferred locale for German on this system is \"$loc_de\".<br />"; 
    echo 'Guten Morgen! Heute ist ' . strftime('%A %d %B %Y', mktime()) . ".</p>\n"; 
} else 
    echo "<p>Sorry! This system doesn't speak German.</p>\n"; 
?>
  
  








Related examples in the same category

1.Setting a default locale
2.Setting a default locale based on system environment
3.Setlocale() Options
4.Generating Localized GMT/UTC Time and Date Strings
5.Displaying Times and Dates in Other Languages
6.setlocale(LC_MONETARY, 'en_DK');
7.setlocale(LC_MONETARY, 'en_US');
8.Preferred locale for Chinese
9.Preferred locale for Russian
10.To report local time for any Germans