8 require_once('LanguageUtf8.php');
10 if (!$wgCachedMessageArrays) {
11 require_once('MessagesKo.php');
14 class LanguageKo
extends LanguageUtf8
{
15 private $mMessagesKo, $mNamespaceNamesKo = null;
17 private $mQuickbarSettingsKo = array(
18 '없음', '왼쪽', '오른쪽', '왼쪽 고정', '오른쪽 고정'
21 private $mSkinNamesKo = array(
29 private $mBookstoreListKo = array(
30 'Aladdin.co.kr' => 'http://www.aladdin.co.kr/catalog/book.asp?ISBN=$1'
33 # (Okay, I think I got it right now. This can be adjusted
34 # in the 'date' function down at the bottom. --Brion)
36 # Thanks. And it's usual that the time comes after dates.
37 # So I've change the timeanddate function, just exchanged $time and $date
38 # But you should check before you install it, 'cause I'm quite stupid about
42 private $mWeekdayAbbreviationsKo = array(
43 '일', '월', '화', '수', '목', '금', '토'
46 function __construct() {
47 parent
::__construct();
49 global $wgAllMessagesKo;
50 $this->mMessagesKo
=& $wgAllMessagesKo;
52 global $wgMetaNamespace;
53 $this->mNamespaceNamesKo
= array(
59 NS_USER_TALK
=> '사용자토론',
60 NS_PROJECT
=> $wgMetaNamespace,
61 NS_PROJECT_TALK
=> $wgMetaNamespace.'토론',
63 NS_IMAGE_TALK
=> '그림토론',
64 NS_MEDIAWIKI
=> 'MediaWiki',
65 NS_MEDIAWIKI_TALK
=> 'MediaWiki토론',
67 NS_TEMPLATE_TALK
=> '틀토론',
69 NS_HELP_TALK
=> '도움말토론',
71 NS_CATEGORY_TALK
=> '분류토론',
75 function getNamespaces() {
76 return $this->mNamespaceNamesKo + parent
::getNamespaces();
79 function getQuickbarSettings() {
80 return $this->mQuickbarSettingsKo
;
83 function getSkinNames() {
84 return $this->mSkinNamesKo + parent
::getSkinNames();
87 function getBookstoreList() {
88 return $this->mBookstoreListKo + parent
::getBookstoreList();
91 function getDateFormats() {
95 function getMessage( $key ) {
96 if( isset( $this->mMessagesKo
[$key] ) ) {
97 return $this->mMessagesKo
[$key];
99 return parent
::getMessage( $key );
103 function getAllMessages() {
104 return $this->mMessagesKo
;
108 * $format and $timecorrection are for compatibility with Language::date
110 function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
111 if ( $adj ) { $ts = $this->userAdjust( $ts ); }
113 $year = (int)substr( $ts, 0, 4 );
114 $month = (int)substr( $ts, 4, 2 );
115 $mday = (int)substr( $ts, 6, 2 );
116 $hour = (int)substr( $ts, 8, 2 );
117 $minute = (int)substr( $ts, 10, 2 );
118 $second = (int)substr( $ts, 12, 2 );
119 $time = mktime( $hour, $minute, $second, $month, $mday, $year );
120 $date = getdate( $time );
122 # "xxxx년 xx월 xx일 (월)"
123 # timeanddate works "xxxx년 xx월 xx일 (월) xx:xx"
125 $this->getMonthAbbreviation( $month ) . "월 " .
127 "(" . $this->mWeekdayAbbreviationsKo
[ $date['wday'] ]. ")";
132 function timeBeforeDate() {
136 function timeDateSeparator( $format ) {
140 function firstChar( $s ) {
141 preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
142 '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})/', $s, $matches);
144 if ( isset( $matches[1] ) ) {
145 if ( strlen( $matches[1] ) != 3 ) {
148 $code = (ord($matches[1]{0}) & 0x0f) << 12;
149 $code |
= (ord($matches[1]{1}) & 0x3f) << 6;
150 $code |
= (ord($matches[1]{2}) & 0x3f);
151 if ( $code < 0xac00 ||
0xd7a4 <= $code) {
153 } elseif ( $code < 0xb098 ) {
154 return "\xe3\x84\xb1";
155 } elseif ( $code < 0xb2e4 ) {
156 return "\xe3\x84\xb4";
157 } elseif ( $code < 0xb77c ) {
158 return "\xe3\x84\xb7";
159 } elseif ( $code < 0xb9c8 ) {
160 return "\xe3\x84\xb9";
161 } elseif ( $code < 0xbc14 ) {
162 return "\xe3\x85\x81";
163 } elseif ( $code < 0xc0ac ) {
164 return "\xe3\x85\x82";
165 } elseif ( $code < 0xc544 ) {
166 return "\xe3\x85\x85";
167 } elseif ( $code < 0xc790 ) {
168 return "\xe3\x85\x87";
169 } elseif ( $code < 0xcc28 ) {
170 return "\xe3\x85\x88";
171 } elseif ( $code < 0xce74 ) {
172 return "\xe3\x85\x8a";
173 } elseif ( $code < 0xd0c0 ) {
174 return "\xe3\x85\x8b";
175 } elseif ( $code < 0xd30c ) {
176 return "\xe3\x85\x8c";
177 } elseif ( $code < 0xd558 ) {
178 return "\xe3\x85\x8d";
180 return "\xe3\x85\x8e";