switch(msgid) { case "string" .... } and than i'm going to put another switch for msgIdPlural inside the default of the switch(msgid) - a multiple branched switch case? In any case I think the if else from beneath is a good call.