code: function(text, inst) {
  			var replaceSection = function(type, retain) {
  				while (true) {
  					var start = text.indexOf('{' + type + ':start}');
  					if (start === -1) {
  						return;
  					}
  					var end = text.substring(start).indexOf('{' + type + ':end}');
  					if (end > -1) {
  						text = text.substring(0, start) +
  							(retain ? text.substr(start + type.length + 8, end - type.length - 8) : '') +
  							text.substring(start + end + type.length + 6);
  					}
  				}
  			};
  			replaceSection('inline', inst.inline);
  			replaceSection('popup', !inst.inline);
  			var pattern = /\{l10n:([^\}]+)\}/;
  			var matches = null;
  			while (matches = pattern.exec(text)) {
  				text = text.replace(matches[0], inst.options[matches[1]]);
  			}
  			return text;
  		}
docs: Prepare a render template for use.
  Exclude popup/inline sections that are not applicable.
  Localise text of the form: {l10n:name}.
  @memberof CalendarsPicker
  @private
  @param text {string} The text to localise.
  @param inst {object} The current instance settings.
  @return {string} The localised text.