Russian uses same inflection as Czech

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@590 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2009-04-29 11:14:11 +00:00
parent 633956b8ce
commit bbdd2a3e03

View file

@ -1,6 +1,6 @@
<?php <?php
$langs = array( $langs = array(
'en' => 'English', 'en' => 'English', // Jakub Vrána - http://php.vrana.cz
'cs' => 'Čeština', // Jakub Vrána - http://php.vrana.cz 'cs' => 'Čeština', // Jakub Vrána - http://php.vrana.cz
'sk' => 'Slovenčina', // Ivan Suchy - http://www.ivansuchy.com 'sk' => 'Slovenčina', // Ivan Suchy - http://www.ivansuchy.com
'nl' => 'Nederlands', // Maarten Balliauw - http://blog.maartenballiauw.be 'nl' => 'Nederlands', // Maarten Balliauw - http://blog.maartenballiauw.be
@ -10,19 +10,14 @@ $langs = array(
'fr' => 'Français', // Francis Gagné 'fr' => 'Français', // Francis Gagné
'it' => 'Italiano', // Alessandro Fiorotto, Paolo Asperti 'it' => 'Italiano', // Alessandro Fiorotto, Paolo Asperti
'et' => 'Eesti', // Priit Kallas 'et' => 'Eesti', // Priit Kallas
'ru'=>'Русский язык', // Juraj Hajdúch 'ru' => 'Русский язык', // Juraj Hajdúch
); );
function lang($idf, $number = null) { function lang($idf, $number = null) {
global $LANG, $translations; global $LANG, $translations;
$translation = $translations[$idf]; $translation = $translations[$idf];
if (is_array($translation) && $translation) { if (is_array($translation) && $translation) {
$pos = ($number == 1 ? 0 : 1); $translation = $translation[($number == 1 ? 0 : ((!$number || $number >= 5) && ereg('cs|sk|ru', $LANG) ? 2 : 1))];
switch ($LANG) {
case 'cs': $pos = ($number == 1 ? 0 : (!$number || $number >= 5 ? 2 : 1)); break;
case 'sk': $pos = ($number == 1 ? 0 : (!$number || $number >= 5 ? 2 : 1)); break;
}
$translation = $translation[$pos];
} }
$args = func_get_args(); $args = func_get_args();
array_shift($args); array_shift($args);