I've added several custom namespaces constants to 'includes/Defines.php' then added those associated with a canonical name form to $wgExtraNamespaces in 'LocalSettings.php'. This works just fine and correctly lists all my custom namespaces in the wiki. However, I can't figure out how to provide translations for these forms. I've tried adding the translation to the appropriate Message file in the $namespaceNames array (i.e. 'languages/messages/MessagesEs.php'). However, when switching the wiki language, the standard namespace translations appear correctly, but it doesn't seem to pick up on any translations for my custom namespaces. Any ideas?
Thanks for any input. -- Johnny
Johnny Williamson wrote:
I've added several custom namespaces constants to 'includes/Defines.php' then added those associated with a canonical name form to $wgExtraNamespaces in 'LocalSettings.php'. This works just fine and correctly lists all my custom namespaces in the wiki. However, I can't figure out how to provide translations for these forms. I've tried adding the translation to the appropriate Message file in the $namespaceNames array (i.e. 'languages/messages/MessagesEs.php'). However, when switching the wiki language, the standard namespace translations appear correctly, but it doesn't seem to pick up on any translations for my custom namespaces. Any ideas?
Namespace names are only retrieved from the file of the *content* language, not the user language. Changing your language in your preferences will not change any namespaces.
You can provide namespace aliases using $wgNamespaceAliases in DefaultSettings.php, but these are only for convenience, when editing pages or typing URLs, they do not affect display.
-- Tim Starling
mediawiki-l@lists.wikimedia.org