Language detection and pass_generate