+ * @param $list array of strings to put in a comma list
+ * @param $forContent bool Use $wgContentLang instead of the UI lang
+ * @return string
+ */
+ function commaList( $list, $forContent = false ) {
+ $params = array( 'escapenoentities' );
+ if ( $forContent === true ) {
+ $params[] = 'content';
+ }
+ return implode(
+ $list,
+ wfMsgExt( 'comma-separator', $params ) );
+ }
+
+ /**
+ * Same as commaList, but separate it with the pipe instead.
+ * @param $list array of strings to put in a pipe list
+ * @param $forContent bool Use $wgContentLang instead of the UI lang
+ * @return string