support arbitary number of languages

language numbers are assigned by list 'languages'