date() function and other languages then english

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

date() function and other languages then english

Post by pelegk2 »

how can i check that when i recive the name of the month using
date("F",time())
i can get then ame of the month not only in english?
i want it for eample in hebrew
is it possible?
then how?
thnaks in advance
peleg
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

[php_man]setlocale[/php_man]() and [php_man]strftime[/php_man]() looks like the things to use.
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

do u know maybe where i can get the list of the defined languages like : "fi_FI"
for :
setlocale(LC_TIME, "fi_FI");
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

[php_man]setlocale[/php_man] wrote:Category/locale names can be found in RFC 1766 and ISO 639.

Note: The return value of setlocale() depends on the system that PHP is running. It returns exactly what the system setlocale function returns.

Tip: Windows users will find useful information about locale strings at Microsoft's MSDNwebsite. Supported language strings can be found at http://msdn.microsoft.com/library/defau ... trings.asp and supported country/region strings at http://msdn.microsoft.com/library/defau ... trings.asp. Windows systems support the three letter codes for country/region specified by ISO 3166-Alpha-3, which can be found at this Unicode website .
Post Reply