Wikipedia:Ingerfäjß/LanguageKsh.php

Uß de Wikipedia

Caution!
When copying source code data from there, always use the wiki code, the display here does not show html entities correctly.

<?php
/** Ripuarian
 *
 * @package MediaWiki
 * @subpackage Language
 *
 * @author Purodha Blissenbach
 */

class LanguageKsh extends Language {
	/**
	 * Avoid grouping whole numbers between 0 to 9999
	 */
	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)
	 */
	function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
		$count = str_replace (' ', '', $count);
		switch ($count) {
			case 1: return $wordform1;
			case 0: return $wordform3;
			default: return $wordform2;
		}
	}
}
?>