We are creating nodes programmatically on submitting a form. The language of a node is an input value in the form. How can I get the langcode, when I have the Language name?
For example, user may type English. So i should convert it to "en"
If there an in-built function for that?