Enhanced method for language identification

Now it should be easier to handle new languages and don´t have to edit two seperate parts of code