+++ /dev/null
-<?php
-/**
- * Based on Language.php 1.645
- * @addtogroup Language
- * Compatible to MediaWiki 1.5
- * Initial translation by Trần Thế Trung and Nguyễn Thanh Quang
- * Last update 28 August 2005 (UTC)
- */
-
-class LanguageVi extends Language {
- function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
- if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); }
-
- $datePreference = $this->dateFormat( $format );
-
- $month = $this->formatMonth( substr( $ts, 4, 2 ), $datePreference );
- $day = $this->formatDay( substr( $ts, 6, 2 ), $datePreference );
- $year = $this->formatNum( substr( $ts, 0, 4 ), true );
-
- switch( $datePreference ) {
- case 3:
- case 4: return "$day/$month/$year";
- case MW_DATE_ISO: return substr($ts, 0, 4). '-' . substr($ts, 4, 2). '-' .substr($ts, 6, 2);
- default: return "$day $month năm $year";
- }
- }
-
- function timeSeparator( $format ) {
- $datePreference = $this->dateFormat($format);
- switch ( $datePreference ) {
- case '4': return 'h';
- default: return ':';
- }
- }
-
- function timeDateSeparator( $format ) {
- $datePreference = $this->dateFormat($format);
- switch ( $datePreference ) {
- case '0':
- case '1':
- case '2': return ', ';
- default: return ' ';
- }
- }
-
- function formatMonth( $month, $format ) {
- $datePreference = $this->dateFormat($format);
- switch ( $datePreference ) {
- case '0':
- case '1': return 'tháng ' . ( 0 + $month );
- case '2': return 'tháng ' . $this->getSpecialMonthName( $month );
- default: return 0 + $month;
- }
- }
-
- function formatDay( $day, $format ) {
- $datePreference = $this->dateFormat($format);
- switch ( $datePreference ) {
- case '0':
- case '1':
- case '2': return 'ngày ' . (0 + $day);
- default: return 0 + $day;
- }
- }
-
- function getSpecialMonthName( $key ) {
- $names = 'Một, Hai, Ba, Tư, Năm, Sáu, Bảy, Tám, Chín, Mười, Mười một, Mười hai';
- $names = explode(', ', $names);
- return $names[$key-1];
- }
-}
-
-?>
$datePreferences = array(
'default',
'vi normal',
- 'vi longmonth',
+ 'vi spelloutmonth',
'vi shortcolon',
- 'vi short',
+ 'vi shorth',
'ISO 8601',
);
$dateFormats = array(
'vi normal time' => 'H:i',
- 'vi normal date' => '"ngày" j M "năm" Y',
- 'vi normal both' => 'H:i, "ngày" j M "năm" Y',
+ 'vi normal date' => '"ngày" j "tháng" n "năm" Y',
+ 'vi normal both' => 'H:i, "ngày" j "tháng" n "năm" Y',
- 'vi longmonth time' => 'H:i',
- 'vi longmonth date' => '"ngày" j F "năm" Y',
- 'vi longmonth both' => 'H:i, "ngày" j F "năm" Y',
+ 'vi spelloutmonth time' => 'H:i',
+ 'vi spelloutmonth date' => '"ngày" j xg "năm" Y',
+ 'vi spelloutmonth both' => 'H:i, "ngày" j xg "năm" Y',
'vi shortcolon time' => 'H:i',
'vi shortcolon date' => 'j/n/Y',
'vi shortcolon both' => 'H:i, j/n/Y',
- 'vi short time' => 'H"h"i',
- 'vi short date' => 'j/n/Y',
- 'vi short both' => 'H"h"i, j/n/Y',
+ 'vi shorth time' => 'H"h"i',
+ 'vi shorth date' => 'j/n/Y',
+ 'vi shorth both' => 'H"h"i, j/n/Y',
);
$datePreferenceMigrationMap = array(
'thursday' => 'thứ năm',
'friday' => 'thứ sáu',
'saturday' => 'thứ bảy',
-'january' => 'tháng Một',
-'february' => 'tháng Hai',
-'march' => 'tháng Ba',
-'april' => 'tháng Tư',
-'may_long' => 'tháng Năm',
-'june' => 'tháng Sáu',
-'july' => 'tháng Bảy',
-'august' => 'tháng Tám',
-'september' => 'tháng Chín',
-'october' => 'tháng Mười',
-'november' => 'tháng Mười một',
-'december' => 'tháng Mười hai',
+'sun' => 'thứ 1',
+'mon' => 'thứ 2',
+'tue' => 'thứ 3',
+'wed' => 'thứ 4',
+'thu' => 'thứ 5',
+'fri' => 'thứ 6',
+'sat' => 'thứ 7',
+'january' => 'tháng 1',
+'february' => 'tháng 2',
+'march' => 'tháng 3',
+'april' => 'tháng 4',
+'may_long' => 'tháng 5',
+'june' => 'tháng 6',
+'july' => 'tháng 7',
+'august' => 'tháng 8',
+'september' => 'tháng 9',
+'october' => 'tháng 10',
+'november' => 'tháng 11',
+'december' => 'tháng 12',
+'january-gen' => 'tháng Một',
+'february-gen' => 'tháng Hai',
+'march-gen' => 'tháng Ba',
+'april-gen' => 'tháng Tư',
+'may-gen' => 'tháng Năm',
+'june-gen' => 'tháng Sáu',
+'july-gen' => 'tháng Bảy',
+'august-gen' => 'tháng Tám',
+'september-gen' => 'tháng Chín',
+'october-gen' => 'tháng Mười',
+'november-gen' => 'tháng Mười một',
+'december-gen' => 'tháng Mười hai',
'jan' => 'tháng 1',
'feb' => 'tháng 2',
'mar' => 'tháng 3',