/    Sign up×
Community /Pin to ProfileBookmark

Date for my language

Hi ? When i execute this code below, it writes 04Aug06, but i want the month “August” to be in my language. What can i do about it?

<?php

echo date(dMy);

?>

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@NogDogAug 04.2006 — [url=http://www.php.net/setlocale]setlocale()[/url]
Copy linkTweet thisAlerts:
@bokehAug 04.2006 — i want the month "August" to be in my language.[/QUOTE]What language is it?
Copy linkTweet thisAlerts:
@Sleep_ModeauthorAug 04.2006 — Thank you so much..

The language is "Turkish".

i did this:

[code=php]
setlocale (LC_ALL, 'Turkish');
echo strftime("%e %B %Y");
[/code]


But i can see only "August 2006", in Turkish. I can't see the day. What is the code or expression for viewing the day?
Copy linkTweet thisAlerts:
@NogDogAug 05.2006 — Try using [b]date("j M Y")[/b] instead of the strftime() function.
Copy linkTweet thisAlerts:
@Sleep_ModeauthorAug 05.2006 — Thanks but that date function also gives me english answer. But i combined all of it and solved the problem ?

[code=php]
setlocale (LC_ALL, 'Turkish');
$tdate = date("j ") . strftime("%B ") . date("Y");
echo $tdate;
[/code]
×

Success!

Help @Sleep_Mode spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...