Create function for converting string to language and moar

As a result I deleted the code of one constructor to prevent duplications.