src/ChrisKonnertz/DeepLy/DeepLy.php
public function getLangCodeByName($langName)
    {
        if (! in_array($langName, self::LANG_NAMES)) {
            throw new \InvalidArgumentException('The language name is unknown');
        }

        return array_search($langName, self::LANG_NAMES);
    }
public function getLangCodeByName($langName)
    {
        if (! in_array($langName, self::LANG_NAMES)) {
            throw new \InvalidArgumentException('The language name is unknown');
        }

        return array_search($langName, self::LANG_NAMES);
    }
Returns the language code of a language for a given language name.
The language name must be one of these: self::LANG_NAMES

@param string $langName The name of the language
@return string