Changed [] to .charAt in translateFormat for IE7 compatibility