• Blog
  • Tumblelog
  • Photos
  • Colophon
  • Contact
  • Lifestream
  • Log in

Tag Cloud

3G 21cineplex Access iTunes Store Add new tag Adobe akismet andra and the backbone antivirus api apple account apple id automattic banjarmasin banjartv bbm Daily Life email facebook flash flash unlimited flickr gmail kayuhbaimbai konser n76 nod32 nokia n76 speedy speedy competition telkomsel telkomsel flash telkom speedy theme twitter typepad typepad antispam w550i w880i windows media player wmp wordpress wordpress 2.7 WP xl xl bebas

Popular

  • How To Update Antivirus NOD32 » Anomali.net (1965)
  • How To Update Nod32 V3 » Anomali.net (1196)
  • Yamaha Mio Soul, Evolusi Mio atau Nouvo? » Anomali.net (420)
  • Kelemahan Utama N76, Chrome Mudah Terkelupas » Anomali.net (207)
  • Tagihan Bulan Pertama Telkomsel Flash Unlimited » Anomali.net (116)
  • Mengenal Fitur-fitur Baru Wordpress 2.7 » Anomali.net (61)

Comments

    • Comment on New Forum Installed… by Wilmington
    • Comment on Tagihan Bulan Pertama Telkomsel Flash Unlimited by Jennine Mcmahill
    • Comment on How To Update Antivirus NOD32 by Henrik U. Hannsen
    • Comment on ??? by Stefanie Reisin
    • Comment on New Forum Installed… by Iala
    • Comment on New Forum Installed… by Topsoil Wilmington De
    • Comment on How To Update Antivirus NOD32 by buy eset
    • Comment on New Forum Installed… by Cyndi Hulburt
    • Comment on jerusalem-matisyahu [dengarlah yang Yahudi katakan soal tanah itu...] by Breanna Nissila
    • Comment on New Forum Installed… by Tory Lieber

Resources

Archives

  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • 0

Live Blogroll

Penanggalan Wordpress Dalam Bahasa Indonesia

July 16, 2007

Wordpress (WP) emang dari sononya cuman mendukung bahasa Inggris. Sampe saat ini belum tersedia versi WP dalam bahasa Indonesia ato dalam bahasa lokal lainnya. Hal ini mempersulit kita yang kepengen punya tema dalam bahasa Indonesia akan tetapi penanggalan dalam WP-nya masih menggunakan bahasa Inggris.

Dengan sedikit editing terhadap file locale.php yang tersimpan di direktori /wp-includes/ (tepatnya /wp-includes/locale.php), kita bisa mendapatkan penanggalan dengan ‘rasa’ Indonesia. Bagi yang males mengubahnya sendiri bisa mengunduhnya dari sini. Perhatikan kode php dari locale.php dalam bahasa Inggris yang udah gue potong berikut ini:


// Date and Time

class WP_Locale {
var $weekday;
var $weekday_initial;
var $weekday_abbrev;

var $month;
var $month_abbrev;

var $meridiem;

var $text_direction = '';
var $locale_vars = array('text_direction');

function init() {
// The Weekdays
$this->weekday[0] = __('Sunday');
$this->weekday[1] = __('Monday');
$this->weekday[2] = __('Tuesday');
$this->weekday[3] = __('Wednesday');
$this->weekday[4] = __('Thursday');
$this->weekday[5] = __('Friday');
$this->weekday[6] = __('Saturday');

// The first letter of each day.  The _%day%_initial suffix is a hack to make
// sure the day initials are unique.
$this->weekday_initial[__('Sunday')]    = __('S_Sunday_initial');
$this->weekday_initial[__('Monday')]    = __('M_Monday_initial');
$this->weekday_initial[__('Tuesday')]   = __('T_Tuesday_initial');
$this->weekday_initial[__('Wednesday')] = __('W_Wednesday_initial');
$this->weekday_initial[__('Thursday')]  = __('T_Thursday_initial');
$this->weekday_initial[__('Friday')]    = __('F_Friday_initial');
$this->weekday_initial[__('Saturday')]  = __('S_Saturday_initial');

foreach ($this->weekday_initial as $weekday_ => $weekday_initial_) {
$this->weekday_initial[$weekday_] = preg_replace('/_.+_initial$/', '', $weekday_initial_);
}

// Abbreviations for each day.
$this->weekday_abbrev[__('Sunday')]    = __('Sun');
$this->weekday_abbrev[__('Monday')]    = __('Mon');
$this->weekday_abbrev[__('Tuesday')]   = __('Tue');
$this->weekday_abbrev[__('Wednesday')] = __('Wed');
$this->weekday_abbrev[__('Thursday')]  = __('Thu');
$this->weekday_abbrev[__('Friday')]    = __('Fri');
$this->weekday_abbrev[__('Saturday')]  = __('Sat');

// The Months
$this->month['01'] = __('January');
$this->month['02'] = __('February');
$this->month['03'] = __('March');
$this->month['04'] = __('April');
$this->month['05'] = __('May');
$this->month['06'] = __('June');
$this->month['07'] = __('July');
$this->month['08'] = __('August');
$this->month['09'] = __('September');
$this->month['10'] = __('October');
$this->month['11'] = __('November');
$this->month['12'] = __('December');

// Abbreviations for each month. Uses the same hack as above to get around the
// 'May' duplication.
$this->month_abbrev[__('January')] = __('Jan_January_abbreviation');
$this->month_abbrev[__('February')] = __('Feb_February_abbreviation');
$this->month_abbrev[__('March')] = __('Mar_March_abbreviation');
$this->month_abbrev[__('April')] = __('Apr_April_abbreviation');
$this->month_abbrev[__('May')] = __('May_May_abbreviation');
$this->month_abbrev[__('June')] = __('Jun_June_abbreviation');
$this->month_abbrev[__('July')] = __('Jul_July_abbreviation');
$this->month_abbrev[__('August')] = __('Aug_August_abbreviation');
$this->month_abbrev[__('September')] = __('Sep_September_abbreviation');
$this->month_abbrev[__('October')] = __('Oct_October_abbreviation');
$this->month_abbrev[__('November')] = __('Nov_November_abbreviation');
$this->month_abbrev[__('December')] = __('Dec_December_abbreviation');

foreach ($this->month_abbrev as $month_ => $month_abbrev_) {
$this->month_abbrev[$month_] = preg_replace('/_.+_abbreviation$/', '', $month_abbrev_);
}

Nah, kita tinggal mengganti penanggalan dalam bahasa Inggris tersebut menjadi penanggalan dalam bahasa Indonesia, seperti berikut ini:


// Date and Time

class WP_Locale {
var $weekday;
var $weekday_initial;
var $weekday_abbrev;

var $month;
var $month_abbrev;

var $meridiem;

var $text_direction = 'ltr';
var $locale_vars = array('text_direction');

function init() {
// The Weekdays
$this->weekday[0] = __('Minggu');
$this->weekday[1] = __('Senin');
$this->weekday[2] = __('Selasa');
$this->weekday[3] = __('Rabu');
$this->weekday[4] = __('Kamis');
$this->weekday[5] = __('Jumat');
$this->weekday[6] = __('Sabtu');

// The first letter of each day.  The _%day%_initial suffix is a hack to make
// sure the day initials are unique.
$this->weekday_initial[__('Minggu')]    = __('M_Minggu_initial');
$this->weekday_initial[__('Senin')]    = __('S_Senin_initial');
$this->weekday_initial[__('Selasa')]   = __('S_Selasa_initial');
$this->weekday_initial[__('Rabu')] = __('R_Rabu_initial');
$this->weekday_initial[__('Kamis')]  = __('K_Kamis_initial');
$this->weekday_initial[__('Jumat')]    = __('J_Jumat_initial');
$this->weekday_initial[__('Sabtu')]  = __('S_Sabtu_initial');

foreach ($this->weekday_initial as $weekday_ => $weekday_initial_) {
$this->weekday_initial[$weekday_] = preg_replace('/_.+_initial$/', '', $weekday_initial_);
}

// Abbreviations for each day.
$this->weekday_abbrev[__('Sunday')]    = __('Min');
$this->weekday_abbrev[__('Monday')]    = __('Sen');
$this->weekday_abbrev[__('Tuesday')]   = __('Sel');
$this->weekday_abbrev[__('Wednesday')] = __('Rab');
$this->weekday_abbrev[__('Thursday')]  = __('Kam');
$this->weekday_abbrev[__('Friday')]    = __('Jum');
$this->weekday_abbrev[__('Saturday')]  = __('Sab');

// The Months
$this->month['01'] = __('Januari');
$this->month['02'] = __('Februari');
$this->month['03'] = __('Maret');
$this->month['04'] = __('April');
$this->month['05'] = __('Mei');
$this->month['06'] = __('Juni');
$this->month['07'] = __('Juli');
$this->month['08'] = __('Agustus');
$this->month['09'] = __('September');
$this->month['10'] = __('Oktober');
$this->month['11'] = __('November');
$this->month['12'] = __('Desember');

// Abbreviations for each month. Uses the same hack as above to get around the
// 'May' duplication.
$this->month_abbrev[__('Januari')] = __('Jan_Januari_abbreviation');
$this->month_abbrev[__('Februari')] = __('Feb_Februari_abbreviation');
$this->month_abbrev[__('Maret')] = __('Mar_Maret_abbreviation');
$this->month_abbrev[__('April')] = __('Apr_April_abbreviation');
$this->month_abbrev[__('Mei')] = __('Mei_Mei_abbreviation');
$this->month_abbrev[__('Juni')] = __('Jun_Juni_abbreviation');
$this->month_abbrev[__('Juli')] = __('Jul_Juli_abbreviation');
$this->month_abbrev[__('Agustus')] = __('Agu_Agustus_abbreviation');
$this->month_abbrev[__('September')] = __('Sep_September_abbreviation');
$this->month_abbrev[__('Oktober')] = __('Okt_Oktober_abbreviation');
$this->month_abbrev[__('November')] = __('Nov_November_abbreviation');
$this->month_abbrev[__('Desember')] = __('Des_Desember_abbreviation');

foreach ($this->month_abbrev as $month_ => $month_abbrev_) {
$this->month_abbrev[$month_] = preg_replace('/_.+_abbreviation$/', '', $month_abbrev_);
}

Selesai.

ilamonaPosted by ilamona

Related Posts

  • Wordpress 2.7 is Officially Released
  • Ngeblog via Flickr
  • Wordcamp Indonesia
  • WP 2.7, They’re Almost Done with Admin UI
  • Mengenal Fitur-fitur Baru Wordpress 2.7
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

8883 Responseshttp://anomali.net/2007/07/16/penanggalan-wordpress-dalam-bahasa-indonesia/Penanggalan+Wordpress+Dalam+Bahasa+Indonesia2007-07-16+09%3A23%3A20ilamona

  1. aLe says:
    July 28, 2007 at 1:12 pm

    Oke juga neh garapan :ciao:

    Reply
  2. TGhurt says:
    August 22, 2009 at 2:09 pm

    Continuing Dental Education Florida

    Viagra On Line
    Your partner will be pleasantly surprised with your decision.
    Purchase Viagra Online

    Viagra works to help you gain and maintain an erection before and during sexual intercourse.
    http://aquarium-fish-guide.com/ – Viagra No Prescription
    The little blue pill that can make a man perform in bed much better, and if you are having trouble gaining an erection that problem becomes history.

    Reply
  3. takien says:
    November 5, 2009 at 10:55 am

    ada gk yang lebih simpel. soalnya klu pake cara ini pas upgrade ntar teroverwrite dengan yang baru

    Reply

Trackbacks/Pingbacks

Leave a Reply

Click here to cancel reply.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


© Anomali.net 2007-2008, Anomali.net proud to be served by WordPress
Theme: FlickrMac flavored from OSDesigner