Take a look at the CentralNotice extension. It provides it's own interface for adding custom translatable messages. There might be some code there that is useful to you.
Sadly unlikely; CN adds messages by creating WikiPages.
~Matt Walker Wikimedia Foundation Fundraising Technology Team