$locale = new Zend_Locale('en_US'); $language = $locale->getLanguage(); echo $language; // output: en
$locale = new Zend_Locale('fr_FR'); $language = $locale->getLanguage(); echo $language; // output: frExplanation: Similar to the previous example, this code retrieves the language code from the specified locale 'fr_FR'. In both examples, we can see that the getLanguage() method is called on an instance of the Zend_Locale class, which indicates that this method belongs to the Zend_Locale package library.