7 require_once('LanguageUtf8.php');
9 /* private */ $wgNamespaceNamesKo = array(
15 NS_USER_TALK
=> '사용자토론',
16 NS_PROJECT
=> $wgMetaNamespace,
17 NS_PROJECT_TALK
=> $wgMetaNamespace.'토론',
19 NS_IMAGE_TALK
=> '그림토론',
21 NS_HELP_TALK
=> '도움말토론',
23 NS_CATEGORY_TALK
=> '분류토론',
24 ) +
$wgNamespaceNamesEn;
26 /* private */ $wgQuickbarSettingsKo = array(
27 '없음', '왼쪽 붙박이', '오른쪽 붙박이', '왼쪽 떠다님'
31 /* private */ $wgSkinNamesKo = array(
34 'cologneblue' => '쾰른 파랑',
37 'monobook' => '모노북(기본값)',
39 'chick' => '칙(Chick)',
43 /* private */ $wgBookstoreListKo = array(
44 'Aladdin.co.kr' => 'http://www.aladdin.co.kr/catalog/book.asp?ISBN=$1'
45 ) +
$wgBookstoreListEn;
49 # (Okay, I think I got it right now. This can be adjusted
50 # in the 'date' function down at the bottom. --Brion)
52 # Thanks. And it's usual that the time comes after dates.
53 # So I've change the timeanddate function, just exchanged $time and $date
54 # But you should check before you install it, 'cause I'm quite stupid about
58 /* private */ $wgWeekdayAbbreviationsKo = array(
59 '일', '월', '화', '수', '목',
63 if (!$wgCachedMessageArrays) {
64 require_once('MessagesKo.php');
67 class LanguageKo
extends LanguageUtf8
{
69 function getBookstoreList() {
70 global $wgBookstoreListKo;
71 return $wgBookstoreListKo;
74 function getNamespaces() {
75 global $wgNamespaceNamesKo;
76 return $wgNamespaceNamesKo;
79 function getQuickbarSettings() {
80 global $wgQuickbarSettingsKo;
81 return $wgQuickbarSettingsKo;
84 function getSkinNames() {
85 global $wgSkinNamesKo;
86 return $wgSkinNamesKo;
89 function getDateFormats() {
93 function date( $ts, $adj = false ) {
94 global $wgWeekdayAbbreviationsKo;
95 if ( $adj ) { $ts = $this->userAdjust( $ts ); }
97 # This is horribly inefficient; I need to rework this
98 $x = getdate(mktime(( (int)substr( $ts, 8, 2) ),
99 (int)substr( $ts, 10, 2 ), (int)substr( $ts, 12, 2 ),
100 (int)substr( $ts, 4, 2 ), (int)substr( $ts, 6, 2 ),
101 (int)substr( $ts, 0, 4 )));
103 $d = substr( $ts, 0, 4 ) . "년 " .
104 $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . "월 " .
105 (0 +
substr( $ts, 6, 2 )) . "일 " .
106 "(" . $wgWeekdayAbbreviationsKo[$x["wday"]] . ")";
110 function timeanddate( $ts, $adj = false ) {
111 return $this->date( $ts, $adj ) . " " . $this->time( $ts, $adj );
114 function getMessage( $key ) {
115 global $wgAllMessagesKo;
116 return isset($wgAllMessagesKo[$key]) ?
$wgAllMessagesKo[$key] : parent
::getMessage($key);
119 function firstChar( $s ) {
120 preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
121 '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})/', $s, $matches);
123 if ( isset( $matches[1] ) ) {
124 if ( strlen( $matches[1] ) != 3 ) {
127 $code = (ord($matches[1]{0}) & 0x0f) << 12;
128 $code |
= (ord($matches[1]{1}) & 0x3f) << 6;
129 $code |
= (ord($matches[1]{2}) & 0x3f);
130 if ( $code < 0xac00 ||
0xd7a4 <= $code) {
132 } elseif ( $code < 0xb098 ) {
133 return "\xe3\x84\xb1";
134 } elseif ( $code < 0xb2e4 ) {
135 return "\xe3\x84\xb4";
136 } elseif ( $code < 0xb77c ) {
137 return "\xe3\x84\xb7";
138 } elseif ( $code < 0xb9c8 ) {
139 return "\xe3\x84\xb9";
140 } elseif ( $code < 0xbc14 ) {
141 return "\xe3\x85\x81";
142 } elseif ( $code < 0xc0ac ) {
143 return "\xe3\x85\x82";
144 } elseif ( $code < 0xc544 ) {
145 return "\xe3\x85\x85";
146 } elseif ( $code < 0xc790 ) {
147 return "\xe3\x85\x87";
148 } elseif ( $code < 0xcc28 ) {
149 return "\xe3\x85\x88";
150 } elseif ( $code < 0xce74 ) {
151 return "\xe3\x85\x8a";
152 } elseif ( $code < 0xd0c0 ) {
153 return "\xe3\x85\x8b";
154 } elseif ( $code < 0xd30c ) {
155 return "\xe3\x85\x8c";
156 } elseif ( $code < 0xd558 ) {
157 return "\xe3\x85\x8d";
159 return "\xe3\x85\x8e";