From: Raimond Spekking Date: Fri, 6 Mar 2009 10:56:37 +0000 (+0000) Subject: * Add Language::semicolonList() function X-Git-Tag: 1.31.0-rc.0~42590 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=8d7026713ff044a36cf3b8c9debc747e65cab87c;p=lhc%2Fweb%2Fwiklou.git * Add Language::semicolonList() function ** Todo: combine all three list functions (comma, semicolon, pipe) into one function with a parameter? * Use pipe as backlink separator to be consistent with other navigation elements * Show the colon for case 'afh_actions' only if parameters exist ** Remove the now useless message * Localize the usages of comma and semicolon --- diff --git a/languages/Language.php b/languages/Language.php index 97f441babc..8853aced5b 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1989,7 +1989,19 @@ class Language { $list, wfMsgExt( 'comma-separator', array( 'escapenoentities', 'language' => $this ) ) ); } - + + /** + * Take a list of strings and build a locale-friendly semicolon-separated + * list, using the local semicolon-separator message. + * @param $list array of strings to put in a semicolon list + * @return string + */ + function semicolonList( $list ) { + return implode( + $list, + wfMsgExt( 'semicolon-separator', array( 'escapenoentities', 'language' => $this ) ) ); + } + /** * Same as commaList, but separate it with the pipe instead. * @param $list array of strings to put in a pipe list