Last modified: 2008-01-20 14:21:58 UTC
wfMsg() finds a non-localizable message in the message cache, which can be overridden by creating a page in the wiki's MediaWiki: namespace with the same message key.
wfMsgForContent() does the same as wfMsg() but for localized strings. It first looks for the string in the user language then falls back (to the interface language or English or both?)
api.php also has meta=allmessages but there is no language option so you can only access the "default" language.
See also Bug 7267.
I'm on it
meta=allmessages already returns whatever wfMsg() returns. I've added the amlang parameter through which the language can be changed in r29984.