/** * Init the additional namespaces used by Semantic Forms. The * parameter denotes the least unused even namespace ID that is * greater or equal to 100. */ function sffInitNamespaces() { global $wgExtraNamespaces, $wgNamespaceAliases, $wgNamespacesWithSubpages, $wgLanguageCode, $sfgContLang; sffInitContentLanguage( $wgLanguageCode ); // Register namespace identifiers if ( !is_array( $wgExtraNamespaces ) ) { $wgExtraNamespaces = array(); } $wgExtraNamespaces = $wgExtraNamespaces + $sfgContLang->getNamespaces(); $wgNamespaceAliases = $wgNamespaceAliases + $sfgContLang->getNamespaceAliases(); // Support subpages only for talk pages by default $wgNamespacesWithSubpages = $wgNamespacesWithSubpages + array( SF_NS_FORM_TALK => true ); }
global $sfgIP, $sfgContLang; if (!empty($sfgContLang)) { return; } $cont_lang_class = 'SF_Language' . str_replace('-', '_', ucfirst($langcode)); if (file_exists($sfgIP . '/languages/' . $cont_lang_class . '.php')) { include_once $sfgIP . '/languages/' . $cont_lang_class . '.php'; } // fallback if language not supported if (!class_exists($cont_lang_class)) { include_once $sfgIP . '/languages/SF_LanguageEn.php'; $cont_lang_class = 'SF_LanguageEn'; } $sfgContLang = new $cont_lang_class(); } sffInitContentLanguage($wgLanguageCode); # ## # The number of allowed values per autocomplete - too many might # slow down the database, and Javascript's completion. # ## $sfgMaxAutocompleteValues = 1000; # ## # Whether to autocomplete on all characters in a string, not just the # beginning of words - this is especially important for Unicode strings, # since the use of the '\b' regexp character to match on the beginnings # of words fails for them. # ## $sfgAutocompleteOnAllChars = false; # ## # Used for caching of autocompletion values. # ##