var TranslateArray = new Array();

{foreach $lang as $k=>$l}
TranslateArray['{$k}'] = '{$l}';
{/foreach}

{literal}
function translate(label) {
	if (TranslateArray[label] == undefined) {
		return label;
	} else {
		return TranslateArray[label];
	}
}
{/literal}