Permalink
Browse files

Russian uses same inflection as Czech

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@590 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent 633956b commit bbdd2a3e03cee7def0c044e48ef2e25985edb3d5 jakubvrana committed Apr 29, 2009
Showing with 3 additions and 8 deletions.
  1. +3 −8 lang.inc.php
View
@@ -1,6 +1,6 @@
<?php
$langs = array(
- 'en' => 'English',
+ 'en' => 'English', // 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
'nl' => 'Nederlands', // Maarten Balliauw - http://blog.maartenballiauw.be
@@ -10,19 +10,14 @@
'fr' => 'Français', // Francis Gagné
'it' => 'Italiano', // Alessandro Fiorotto, Paolo Asperti
'et' => 'Eesti', // Priit Kallas
- 'ru'=>'Русский язык', // Juraj Hajdúch
+ 'ru' => 'Русский язык', // Juraj Hajdúch
);
function lang($idf, $number = null) {
global $LANG, $translations;
$translation = $translations[$idf];
if (is_array($translation) && $translation) {
- $pos = ($number == 1 ? 0 : 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];
+ $translation = $translation[($number == 1 ? 0 : ((!$number || $number >= 5) && ereg('cs|sk|ru', $LANG) ? 2 : 1))];
}
$args = func_get_args();
array_shift($args);

0 comments on commit bbdd2a3

Please sign in to comment.