Fast string formatting in for loop
I think you need a mix of lookup object(s) and regular if statements; there are clearly direct matches, matches on the prefix and the rest. Also, to write else if is pointless since you return anyway in previous if checks, so you can simply use

if(condition){
  return value
}
if(condition2){ // &lt;- no else here
  return value2
}


All that together you could consider something like this:

var formatTitleDirectMapping = {
  'total' : 'title',
  'type' : label_documenttype,
  'dokumenttype' : label_documenttype,
  'km_type' : label_documenttype,
  'spesfikasjon' : label_theme,
}

var formatTitlePrefixMapping = {
  'tema_' : label_theme,
  'prosess_' : label_process,
  'dokumenttype' : label_documenttype,
  'km_type' : label_documenttype,
}    

function formatTitle(input) {
  var lower = input.toLowerCase();
  //Is there a straight forward conversion? Then get out
  if( formatTitleDirectMapping[lower] )
    return formatTitleDirectMapping[lower];
  //Is there a straight forward conversion for the prefix? Then get out
  var prefix = lower.split("_")[0];
  if( formatTitlePrefixMapping[prefix] )
    return formatTitlePrefixMapping[prefix];
  //Put the conversions that dont lend themselves to lookup structures here
  if( prefix == "sm") {
    return input.substr(3);           
  } 
  //Catch all
  return input.charAt(0).toUpperCase() + input.slice(1)
}