diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2006-10-11 20:21:25 +0000 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2006-10-11 20:21:25 +0000 |
commit | d81f562b712f2387fa02290bf2ca86392ab356f2 (patch) | |
tree | d666cdefbe6ac320827a2c6cb473581b46e22c4c /languages/classes/LanguageKsh.php | |
parent | 183851b06bd6c52f3cae5375f433da720d410447 (diff) |
Aktualisierung auf Version 1.8.1
Diffstat (limited to 'languages/classes/LanguageKsh.php')
-rw-r--r-- | languages/classes/LanguageKsh.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/languages/classes/LanguageKsh.php b/languages/classes/LanguageKsh.php new file mode 100644 index 00000000..412a00f4 --- /dev/null +++ b/languages/classes/LanguageKsh.php @@ -0,0 +1,35 @@ +<?php +/** Ripuarian (RipoarÄ—sh) + * + * @package MediaWiki + * @subpackage Language + * + * @author Purodha Blissenbach + */ + +class LanguageKsh extends Language { + /** + * Avoid grouping whole numbers between 0 to 9999 + */ + public function commafy( $_ ) { + if ( !preg_match( '/^\d{1,4}$/', $_ ) ) { + return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1 ', strrev( $_ ) ) ); + } else { + return $_; + } + } + /** + * Handle cases of (1, other, 0) or (1, other) + */ + public function convertPlural( $count, $w1, $w2, $w3 ) { + $count = str_replace (' ', '', $count); + if ( $count == '1' ) { + return $w1; + } elseif ( $count == '0' && $w3 ) { + return $w3; + } else { + return $w2; + } + } +} +?> |