diff options
Diffstat (limited to 'languages/classes/LanguagePl.php')
-rw-r--r-- | languages/classes/LanguagePl.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/languages/classes/LanguagePl.php b/languages/classes/LanguagePl.php index 54314fab..bb798913 100644 --- a/languages/classes/LanguagePl.php +++ b/languages/classes/LanguagePl.php @@ -21,4 +21,12 @@ class LanguagePl extends Language { return $forms[2]; // plural genitive } } + + function commafy($_) { + if (!preg_match('/^\d{1,4}(.\d+)?$/',$_)) { + return strrev((string)preg_replace('/(\d{3})(?=\d)(?!\d*\.)/','$1,',strrev($_))); + } else { + return $_; + } + } } |