Moved language function to helper, better sqlite check