català, wordpress

locale.php de wordpress en català

Estic trastejant un poc amb el wordpress, per a la nova versió de argos-metal.com i hem feia falta tindre traduït aquest fitxer per mostrar en català les dates dels posts i com que no el vaig trobar en cap lloc, tampoc es que hem deixara la pell buscant, i vaig haver de traduir-lo:

// Date and Time

// The Weekdays
$weekday[0] = __(‘Diumenge’);
$weekday[1] = __(‘Dilluns’);
$weekday[2] = __(‘Dimarts’);
$weekday[3] = __(‘Dimecres’);
$weekday[4] = __(‘Dijous’);
$weekday[5] = __(‘Divendres’);
$weekday[6] = __(‘Dissabte’);

// The first letter of each day. The _%day%_initial suffix is a hack to make
// sure the day initials are unique. They should be translated to a one
// letter initial.
$weekday_initial[__(‘Diumenge’)] = __(‘D_Sunday_initial’);
$weekday_initial[__(‘Dilluns’)] = __(‘L_Monday_initial’);
$weekday_initial[__(‘Dimarts’)] = __(‘T_Tuesday_initial’);
$weekday_initial[__(‘Dimecres’)] = __(‘C_Wednesday_initial’);
$weekday_initial[__(‘Dijous’)] = __(‘J_Thursday_initial’);
$weekday_initial[__(‘Divendres’)] = __(‘V_Friday_initial’);
$weekday_initial[__(‘Dissabte’)] = __(‘S_Saturday_initial’);

foreach ($weekday_initial as $weekday_ => $weekday_initial_) {
$weekday_initial[$weekday_] = preg_replace(‘/_.+_initial$/’, ”, $weekday_initial_);
}

// Abbreviations for each day.
$weekday_abbrev[__(‘Diumenge’)] = __(‘dg’);
$weekday_abbrev[__(‘Dilluns’)] = __(‘dl’);
$weekday_abbrev[__(‘Dimarts’)] = __(‘dt’);
$weekday_abbrev[__(‘Dimecres’)] = __(‘dc’);
$weekday_abbrev[__(‘Dijous’)] = __(‘dj’);
$weekday_abbrev[__(‘Divendres’)] = __(‘dv’);
$weekday_abbrev[__(‘Dissabte’)] = __(‘ds’);

// The Months
$month[’01’] = __(‘Gener’);
$month[’02’] = __(‘Feber’);
$month[’03’] = __(‘Març’);
$month[’04’] = __(‘Abril’);
$month[’05’] = __(‘Maig’);
$month[’06’] = __(‘Juny’);
$month[’07’] = __(‘Jaliol’);
$month[’08’] = __(‘Agost’);
$month[’09’] = __(‘Setebre’);
$month[’10’] = __(‘Octubre’);
$month[’11’] = __(‘Novembre’);
$month[’12’] = __(‘Desembre’);

// Abbreviations for each month. Uses the same hack as above to get around the
// ‘May’ duplication.
$month_abbrev[__(‘Gener’)] = __(‘Gen_January_abbreviation’);
$month_abbrev[__(‘Febrer’)] = __(‘Feb_February_abbreviation’);
$month_abbrev[__(‘Març’)] = __(‘Mar_March_abbreviation’);
$month_abbrev[__(‘Abril’)] = __(‘Abr_April_abbreviation’);
$month_abbrev[__(‘Maig’)] = __(‘Mag_May_abbreviation’);
$month_abbrev[__(‘Juny’)] = __(‘Jun_June_abbreviation’);
$month_abbrev[__(‘Juliol’)] = __(‘Jul_July_abbreviation’);
$month_abbrev[__(‘Agost’)] = __(‘Ago_August_abbreviation’);
$month_abbrev[__(‘Setembre’)] = __(‘Set_September_abbreviation’);
$month_abbrev[__(‘Octubre’)] = __(‘Oct_October_abbreviation’);
$month_abbrev[__(‘Novembre’)] = __(‘Nov_November_abbreviation’);
$month_abbrev[__(‘Desembre’)] = __(‘Des_December_abbreviation’);

foreach ($month_abbrev as $month_ => $month_abbrev_) {
$month_abbrev[$month_] = preg_replace(‘/_.+_abbreviation$/’, ”, $month_abbrev_);
}

?>

Estàndard

Deixa un comentari

Fill in your details below or click an icon to log in:

WordPress.com Logo

Esteu comentant fent servir el compte WordPress.com. Log Out / Canvia )

Twitter picture

Esteu comentant fent servir el compte Twitter. Log Out / Canvia )

Facebook photo

Esteu comentant fent servir el compte Facebook. Log Out / Canvia )

Google+ photo

Esteu comentant fent servir el compte Google+. Log Out / Canvia )

Connecting to %s