Board Thread:Support Requests - Getting Technical/@comment-3279487-20161005125325/@comment-2200849-20161005130153

Wikia uses two methods for using MediaWiki messages on the frontend in Javascript:
 * JSMessages, a pre-MW 1.19 in-house solution which provides . This function does not offer escaping or parsing but supports   and.
 * ResourceLoader client-side module since 1.19 upgrade, which provides, with fully featured parsing, escaping etc.

You can check which messages are available on page load by checking the contents of:
 * - these are accessible via
 * these are accessible via.

To make messages registered via JSMessages available to, just call. To load your own messages, use /** @return instance of jQuery.Promise */ function loadMessages( messages ) { return new mw.Api.get( {		action: 'query',		meta: 'allmessages',		ammessages: messages.join( '|' ),		amlang: mw.config.get( 'wgUserLanguage' )	} ).then( function ( data ) {		$.each( data.query.allmessages, function ( i, message ) { if ( message.missing !== '' ) { mw.messages.set( message.name, message['*'] ); }		} );	} ); }

loadMessages( [ 'january', 'february', 'march' ] ).then( doStuff );