macdonst / SpeechRecognitionPlugin

W3C Web Speech API - Speech Recognition plugin for PhoneGap
MIT License
189 stars 95 forks source link

Setting language #28

Closed jtanori closed 9 years ago

jtanori commented 9 years ago

How do you set the language to use? I see there is some hardcoded value in SpeechRecognition definition:

var SpeechRecognition = function () {
    this.grammars = null;
    this.lang = "en";// <- This one
    ...

Looks like those values should be passed along with the constructor call, anyway I tried setting the lgn atribute in the root html tag but that does not work either.