creates list of languages to be used for <distinct>