2004-02-18 02:15:00 +00:00
|
|
|
<?php
|
2005-06-20 11:35:32 +00:00
|
|
|
/** Czech (česky)
|
|
|
|
|
*
|
|
|
|
|
* @package MediaWiki
|
|
|
|
|
* @subpackage Language
|
|
|
|
|
*/
|
|
|
|
|
|
2005-07-05 21:22:25 +00:00
|
|
|
/** */
|
2005-06-20 11:35:32 +00:00
|
|
|
require_once( 'LanguageUtf8.php' );
|
|
|
|
|
|
|
|
|
|
# Yucky hardcoding hack
|
|
|
|
|
switch( $wgMetaNamespace ) {
|
|
|
|
|
case 'Wikipedie':
|
2006-01-27 13:56:27 +00:00
|
|
|
case 'Wikipedia':
|
2005-06-20 11:35:32 +00:00
|
|
|
$wgUserNamespace = 'Wikipedista'; break;
|
|
|
|
|
default:
|
|
|
|
|
$wgUserNamespace = 'Uživatel';
|
|
|
|
|
}
|
2003-04-14 23:10:40 +00:00
|
|
|
|
|
|
|
|
/* private */ $wgNamespaceNamesCs = array(
|
2005-08-15 19:27:58 +00:00
|
|
|
NS_MEDIA => 'Média',
|
|
|
|
|
NS_SPECIAL => 'Speciální',
|
|
|
|
|
NS_MAIN => '',
|
|
|
|
|
NS_TALK => 'Diskuse',
|
|
|
|
|
NS_USER => $wgUserNamespace,
|
|
|
|
|
NS_USER_TALK => $wgUserNamespace . '_diskuse',
|
|
|
|
|
NS_PROJECT => $wgMetaNamespace,
|
|
|
|
|
NS_PROJECT_TALK => $wgMetaNamespace . '_diskuse',
|
|
|
|
|
NS_IMAGE => 'Soubor',
|
|
|
|
|
NS_IMAGE_TALK => 'Soubor_diskuse',
|
|
|
|
|
NS_MEDIAWIKI => 'MediaWiki',
|
|
|
|
|
NS_MEDIAWIKI_TALK => 'MediaWiki_diskuse',
|
|
|
|
|
NS_TEMPLATE => 'Šablona',
|
|
|
|
|
NS_TEMPLATE_TALK => 'Šablona_diskuse',
|
|
|
|
|
NS_HELP => 'Nápověda',
|
|
|
|
|
NS_HELP_TALK => 'Nápověda_diskuse',
|
|
|
|
|
NS_CATEGORY => 'Kategorie',
|
|
|
|
|
NS_CATEGORY_TALK => 'Kategorie_diskuse',
|
2004-06-28 02:27:03 +00:00
|
|
|
) + $wgNamespaceNamesEn;
|
2003-04-14 23:10:40 +00:00
|
|
|
|
|
|
|
|
/* private */ $wgQuickbarSettingsCs = array(
|
2005-08-15 19:27:58 +00:00
|
|
|
'Žádný', 'Leží vlevo', 'Leží vpravo', 'Visí vlevo'
|
2003-04-14 23:10:40 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/* private */ $wgSkinNamesCs = array(
|
2005-08-15 19:27:58 +00:00
|
|
|
'standard' => 'Standard',
|
|
|
|
|
'nostalgia' => 'Nostalgie',
|
|
|
|
|
'cologneblue' => 'Kolínská modř',
|
|
|
|
|
'chick' => 'Kuře'
|
2005-06-20 11:35:32 +00:00
|
|
|
) + $wgSkinNamesEn;
|
2003-04-14 23:10:40 +00:00
|
|
|
|
2005-06-20 11:35:32 +00:00
|
|
|
# Hledání knihy podle ISBN
|
2003-04-14 23:10:40 +00:00
|
|
|
# $wgBookstoreListCs = ..
|
2004-07-27 14:38:58 +00:00
|
|
|
/* private */ $wgBookstoreListCs = array(
|
2005-06-20 11:35:32 +00:00
|
|
|
'Národní knihovna' => 'http://sigma.nkp.cz/F/?func=find-a&find_code=ISN&request=$1',
|
|
|
|
|
'Státní technická knihovna' => 'http://www.stk.cz/cgi-bin/dflex/CZE/STK/BROWSE?A=01&V=$1'
|
|
|
|
|
) + $wgBookstoreListEn;
|
2003-04-14 23:10:40 +00:00
|
|
|
|
2005-06-20 11:35:32 +00:00
|
|
|
# Note to translators:
|
|
|
|
|
# Please include the English words as synonyms. This allows people
|
|
|
|
|
# from other wikis to contribute more easily.
|
|
|
|
|
#
|
|
|
|
|
# Nepoužívá se, pro používání je třeba povolit getMagicWords dole v LanguageCs.
|
2006-01-27 13:56:27 +00:00
|
|
|
/* private */ $wgMagicWordsCs = array(
|
2005-06-20 11:35:32 +00:00
|
|
|
## ID CASE SYNONYMS
|
2006-01-27 13:56:27 +00:00
|
|
|
MAG_REDIRECT => array( 0, '#REDIRECT', '#PŘESMĚRUJ' ),
|
|
|
|
|
MAG_NOTOC => array( 0, '__NOTOC__', '__BEZOBSAHU__' ),
|
|
|
|
|
MAG_FORCETOC => array( 0, '__FORCETOC__', '__VŽDYOBSAH__' ),
|
|
|
|
|
MAG_TOC => array( 0, '__TOC__', '__OBSAH__' ),
|
|
|
|
|
MAG_NOEDITSECTION => array( 0, '__NOEDITSECTION__', '__BEZEDITOVATČÁST__' ),
|
|
|
|
|
MAG_START => array( 0, '__START__', '__ZAČÁTEK__' ),
|
|
|
|
|
MAG_CURRENTMONTH => array( 1, 'CURRENTMONTH', 'AKTUÁLNÍMĚSÍC' ),
|
|
|
|
|
MAG_CURRENTMONTHNAME => array( 1, 'CURRENTMONTHNAME', 'AKTUÁLNÍMĚSÍCJMÉNO' ),
|
|
|
|
|
MAG_CURRENTMONTHNAMEGEN => array( 1, 'CURRENTMONTHNAMEGEN', 'AKTUÁLNÍMĚSÍCGEN' ),
|
|
|
|
|
# MAG_CURRENTMONTHABBREV => array( 1, 'CURRENTMONTHABBREV' 'AKTUÁLNÍMĚSÍCZKR' ),
|
|
|
|
|
MAG_CURRENTDAY => array( 1, 'CURRENTDAY', 'AKTUÁLNÍDEN' ),
|
|
|
|
|
MAG_CURRENTDAYNAME => array( 1, 'CURRENTDAYNAME', 'AKTUÁLNÍDENJMÉNO' ),
|
|
|
|
|
MAG_CURRENTYEAR => array( 1, 'CURRENTYEAR', 'AKTUÁLNÍROK' ),
|
|
|
|
|
MAG_CURRENTTIME => array( 1, 'CURRENTTIME', 'AKTUÁLNÍČAS' ),
|
|
|
|
|
MAG_NUMBEROFARTICLES => array( 1, 'NUMBEROFARTICLES', 'POČETČLÁNKŮ' ),
|
|
|
|
|
MAG_PAGENAME => array( 1, 'PAGENAME', 'NÁZEVSTRANY' ),
|
|
|
|
|
MAG_PAGENAMEE => array( 1, 'PAGENAMEE', 'NÁZEVSTRANYE' ),
|
|
|
|
|
MAG_NAMESPACE => array( 1, 'NAMESPACE', 'JMENNÝPROSTOR' ),
|
|
|
|
|
MAG_MSG => array( 0, 'MSG:' ),
|
|
|
|
|
MAG_SUBST => array( 0, 'SUBST:', 'VLOŽIT:' ),
|
|
|
|
|
MAG_MSGNW => array( 0, 'MSGNW:', 'VLOŽITNW:' ),
|
|
|
|
|
MAG_END => array( 0, '__END__', '__KONEC__' ),
|
|
|
|
|
MAG_IMG_THUMBNAIL => array( 1, 'thumbnail', 'thumb', 'náhled' ),
|
|
|
|
|
MAG_IMG_RIGHT => array( 1, 'right', 'vpravo' ),
|
|
|
|
|
MAG_IMG_LEFT => array( 1, 'left', 'vlevo' ),
|
|
|
|
|
MAG_IMG_NONE => array( 1, 'none', 'žádné' ),
|
|
|
|
|
MAG_IMG_WIDTH => array( 1, '$1px' ),
|
|
|
|
|
MAG_IMG_CENTER => array( 1, 'center', 'centre', 'střed' ),
|
|
|
|
|
MAG_IMG_FRAMED => array( 1, 'framed', 'enframed', 'frame', 'rám' ),
|
|
|
|
|
MAG_INT => array( 0, 'INT:' ),
|
|
|
|
|
MAG_SITENAME => array( 1, 'SITENAME', 'NÁZEVSERVERU' ),
|
|
|
|
|
MAG_NS => array( 0, 'NS:' ),
|
|
|
|
|
MAG_LOCALURL => array( 0, 'LOCALURL:', 'MÍSTNÍURL:' ),
|
|
|
|
|
MAG_LOCALURLE => array( 0, 'LOCALURLE:', 'MÍSTNÍURLE:' ),
|
|
|
|
|
MAG_SERVER => array( 0, 'SERVER' ),
|
|
|
|
|
MAG_REVISIONID => array( 1, 'REVISIONID', 'IDREVIZE' )
|
|
|
|
|
);
|
2004-07-23 07:03:52 +00:00
|
|
|
|
2006-01-22 00:40:23 +00:00
|
|
|
if (!$wgCachedMessageArrays) {
|
|
|
|
|
require_once('MessagesCs.php');
|
|
|
|
|
}
|
2003-04-14 23:10:40 +00:00
|
|
|
|
2005-06-20 11:35:32 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
|
# Internationalisation code
|
|
|
|
|
#--------------------------------------------------------------------------
|
2003-04-14 23:10:40 +00:00
|
|
|
|
|
|
|
|
class LanguageCs extends LanguageUtf8 {
|
|
|
|
|
|
2005-08-15 19:27:58 +00:00
|
|
|
function getBookstoreList () {
|
|
|
|
|
global $wgBookstoreListCs ;
|
|
|
|
|
return $wgBookstoreListCs ;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getNamespaces() {
|
|
|
|
|
global $wgNamespaceNamesCs;
|
|
|
|
|
return $wgNamespaceNamesCs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getNsIndex( $text ) {
|
|
|
|
|
global $wgNamespaceNamesCs;
|
|
|
|
|
|
|
|
|
|
foreach ( $wgNamespaceNamesCs as $i => $n ) {
|
|
|
|
|
if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getQuickbarSettings() {
|
|
|
|
|
global $wgQuickbarSettingsCs;
|
|
|
|
|
return $wgQuickbarSettingsCs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getSkinNames() {
|
|
|
|
|
global $wgSkinNamesCs;
|
|
|
|
|
return $wgSkinNamesCs;
|
|
|
|
|
}
|
|
|
|
|
|
2006-01-27 13:56:27 +00:00
|
|
|
function getMonthNameGen( $key ) {
|
|
|
|
|
#TODO: převést na return $this->convertGrammar( $this->getMonthName( $key ), '2sg' );
|
2006-02-05 21:26:59 +00:00
|
|
|
global $wgMonthNamesGenEn, $wgContLang;
|
|
|
|
|
// see who called us and use the correct message function
|
|
|
|
|
if( get_class( $wgContLang->getLangObj() ) == get_class( $this ) )
|
|
|
|
|
return wfMsgForContent( $wgMonthNamesGenEn[$key-1] );
|
|
|
|
|
else
|
|
|
|
|
return wfMsg( $wgMonthNamesGenEn[$key-1] );
|
2006-01-27 13:56:27 +00:00
|
|
|
}
|
|
|
|
|
|
2005-11-08 00:57:09 +00:00
|
|
|
function formatMonth( $month, $format ) {
|
|
|
|
|
return intval( $month ) . '.';
|
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-11-08 00:57:09 +00:00
|
|
|
function formatDay( $day, $format ) {
|
|
|
|
|
return intval( $day ) . '.';
|
2005-08-15 19:27:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getMessage( $key ) {
|
|
|
|
|
global $wgAllMessagesCs;
|
|
|
|
|
if(array_key_exists($key, $wgAllMessagesCs))
|
|
|
|
|
return $wgAllMessagesCs[$key];
|
|
|
|
|
else
|
|
|
|
|
return parent::getMessage($key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getAllMessages() {
|
|
|
|
|
global $wgAllMessagesCs;
|
|
|
|
|
return $wgAllMessagesCs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function checkTitleEncoding( $s ) {
|
|
|
|
|
|
|
|
|
|
# Check for non-UTF-8 URLs; assume they are WinLatin2
|
|
|
|
|
$ishigh = preg_match( '/[\x80-\xff]/', $s);
|
|
|
|
|
$isutf = ($ishigh ? preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
|
|
|
|
|
'[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s ) : true );
|
|
|
|
|
|
|
|
|
|
if( $ishigh and !$isutf ) {
|
|
|
|
|
return iconv( 'cp1250', 'utf-8', $s );
|
2006-01-27 13:56:27 +00:00
|
|
|
}
|
2005-08-15 19:27:58 +00:00
|
|
|
|
|
|
|
|
return $s;
|
|
|
|
|
}
|
|
|
|
|
|
2006-04-29 20:07:14 +00:00
|
|
|
function separatorTransformTable() {
|
|
|
|
|
return array(',' => "\xc2\xa0", '.' => ',' );
|
2003-04-14 23:10:40 +00:00
|
|
|
}
|
|
|
|
|
|
2006-01-27 13:56:27 +00:00
|
|
|
# Grammatical transformations, needed for inflected languages
|
|
|
|
|
# Invoked by putting {{grammar:case|word}} in a message
|
|
|
|
|
function convertGrammar( $word, $case ) {
|
2006-05-25 14:31:28 +00:00
|
|
|
global $wgGrammarForms;
|
2006-05-25 20:52:45 +00:00
|
|
|
if ( isset($wgGrammarForms['cs'][$case][$word]) ) {
|
|
|
|
|
return $wgGrammarForms['cs'][$case][$word];
|
2006-05-25 14:31:28 +00:00
|
|
|
}
|
2006-01-27 13:56:27 +00:00
|
|
|
# allowed values for $case:
|
|
|
|
|
# 1sg, 2sg, ..., 7sg -- nominative, genitive, ... (in singular)
|
|
|
|
|
switch ( $word ) {
|
|
|
|
|
case 'Wikipedia':
|
|
|
|
|
case 'Wikipedie':
|
|
|
|
|
switch ( $case ) {
|
|
|
|
|
case '3sg':
|
|
|
|
|
case '4sg':
|
|
|
|
|
case '6sg':
|
|
|
|
|
return 'Wikipedii';
|
|
|
|
|
case '7sg':
|
|
|
|
|
return 'Wikipedií';
|
|
|
|
|
default:
|
|
|
|
|
return 'Wikipedie';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case 'Wiktionary':
|
|
|
|
|
case 'Wikcionář':
|
|
|
|
|
switch ( $case ) {
|
|
|
|
|
case '2sg':
|
|
|
|
|
return 'Wikcionáře';
|
|
|
|
|
case '3sg':
|
|
|
|
|
case '5sg';
|
|
|
|
|
case '6sg';
|
|
|
|
|
return 'Wikcionáři';
|
|
|
|
|
case '7sg':
|
|
|
|
|
return 'Wikcionářem';
|
|
|
|
|
default:
|
|
|
|
|
return 'Wikcionář';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case 'Wikiquote':
|
|
|
|
|
case 'Wikicitáty':
|
|
|
|
|
switch ( $case ) {
|
|
|
|
|
case '2sg':
|
|
|
|
|
return 'Wikicitátů';
|
|
|
|
|
case '3sg':
|
|
|
|
|
return 'Wikicitátům';
|
|
|
|
|
case '6sg';
|
|
|
|
|
return 'Wikicitátech';
|
|
|
|
|
default:
|
|
|
|
|
return 'Wikicitáty';
|
|
|
|
|
}
|
2003-04-14 23:10:40 +00:00
|
|
|
}
|
2006-01-27 13:56:27 +00:00
|
|
|
# unknown
|
|
|
|
|
return $word;
|
|
|
|
|
}
|
2003-04-14 23:10:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|