Wednesday, July 14

PHP : Displaying the date and time in indonesian language

By this time I hope you can create your own date and time using the timestamp
of the current date or your own timestamp. I use Indonesia language and I want to
display the date in Indonesian language. How can I do it? That's a perfect
question and asked by most beginners.

Let's create an associative array of date and month in our own language.

$days = Array ("Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jum'at", "Sabtu");
$months = Array (1=>"Januari", 2=>"Pebruari", 3=>"Maret", 4=>"April",
5=>"Mei", 6=>"Juni", 7=>"Juli", 8=>"Agustus", 9=>"September",
10=>"Oktober", 11=>"Nopember", 12=>"Desember");

After we create our own language of date and months, now it's time to display
it.

print $days[date("w")]; // display name of day with our own language
print $months[date("n")];

Ok guys, that's it for today. We'll see you again next time.

13 comments:

  1. This is a really good tip especially to those new to the blogosphere.
    Simple but very accurate information… Thank you
    for sharing this one. A must read post!

    Also visit my web site ... search affiliate programs

    ReplyDelete
  2. Great weblog right here! Additionally your website a lot up very fast!
    What host are you the usage of? Can I get your
    affiliate hyperlink for your host? I wish my website loaded up as quickly
    as yours lol

    Feel free to visit my web blog ... arbeitnehmer private krankenversicherung

    ReplyDelete
  3. You are so interesting! I do not think I've truly read a single thing like that before. So nice to find someone with original thoughts on this subject. Really.. thank you for starting this up. This website is something that is required on the internet, someone with a little originality!

    Here is my weblog - Local Seo

    ReplyDelete
  4. I know this web site gives quality depending posts and additional data,
    is there any other site which provides these data
    in quality?

    Also visit my website ... krankenkassen privat vergleich

    ReplyDelete
  5. Incredible points. Great arguments. Keep
    up the great spirit.

    Review my web page: work online at home jobs

    ReplyDelete
  6. I absolutely love your blog.. Excellent colors & theme.
    Did you build this web site yourself? Please reply back as I'm wanting to create my own personal blog and would like to find out where you got this from or what the theme is named. Kudos!

    Here is my website ... online marketing and seo

    ReplyDelete
  7. I'm really inspired with your writing talents and also with the structure on your weblog. Is this a paid theme or did you customize it yourself? Anyway keep up the excellent high quality writing, it's uncommon to look a great blog like this one nowadays.
    .

    Here is my web blog: private krankenversicherung familie

    ReplyDelete
  8. Useful info. Lucky me I found your web site unintentionally, and I'm stunned why this twist of fate didn't took place in advance!
    I bookmarked it.

    My homepage: Qualifications For Home Equity Loan

    ReplyDelete
  9. After I initially commented I appear to have clicked on the -Notify me when new comments are added- checkbox and from now on each time a comment is added I
    get four emails with the same comment. Is there a way you can remove me from that service?

    Many thanks!

    Look into my webpage web hosting reseller accounts

    ReplyDelete
  10. Attractive section of content. I just stumbled upon your blog and in accession capital to assert that I get actually enjoyed
    account your blog posts. Anyway I will be subscribing to
    your augment and even I achievement you access consistently rapidly.


    my web site :: wechsel privat in gesetzliche krankenversicherung

    ReplyDelete
  11. Thanks for ones marvelous posting! I really enjoyed
    reading it, you may be a great author.I will remember to bookmark your blog and will often come back at some point.
    I want to encourage you to definitely continue your great posts, have a nice morning!



    My web page günstige privatversicherung

    ReplyDelete
  12. Fantastic beat ! I wish to apprentice while you amend
    your website, how can i subscribe for a blog website?
    The account aided me a acceptable deal. I had been tiny bit acquainted of this your broadcast provided bright
    clear concept

    Here is my webpage - affordable all inclusive honeymoons

    ReplyDelete
  13. Hello, what entice you to post an report. This article was wonderful diverting, in particular because I was looking for ideas on this subject final Thursday.



    Also visit my blog post own your own business ideas

    ReplyDelete

Pencarian Google