-3

I am using this PHP Function, which is working great:

<?php echo date('l, d F Y'); ?>

Today, it outputs Tuesday, 19 November 2013, but I want it to be in my language. Is there a way I can set variables for each day of the week, and each month of the year, in my language?

Thanks.

Amar Syla
  • 3,183
  • 3
  • 25
  • 67

2 Answers2

2

From the docs:

To format dates in other languages, you should use the setlocale() and strftime() functions instead of date().

jszobody
  • 27,683
  • 6
  • 59
  • 69
-1

$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);

Raul Duran
  • 538
  • 5
  • 5