1 2 $result = $translate->detectLanguage('Bonjour le monde!'); echo $result['languageCode']; // output is 'fr'