-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,523
  • 3
  • 29
  • 69

2 Answers2

2

From the docs:

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

jszobody
  • 28,495
  • 6
  • 61
  • 72
-1

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

Raul Duran
  • 538
  • 5
  • 5