I am working with Php and right now i am getting date in following format
21 Dec 22 14:13
And i want to convert this date time into arabic language format,expected output is
٢١ ديسمبر ٢٢:١٣
Can we do this without "google api",How can i do this with php ?
2
Answers
many of suggestion say you have to set
setlocale
butsetlocale
won’t actually do any language translation for you but rather affects things like the formatting and comparator functionality. If you want localisation then you could try using IntlDateFormatter which may give you what you need.PHP has everything you need for date formatting. Using IntlDateFormatter:
Refer the IntlDateFormatter docs.