Enhanced method for language identification

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