framework/i18n/CLocale.php
public function getLanguageID($id)
	{
		// normalize id
		$id = $this->getCanonicalID($id);
		// remove sub tags
		if(($underscorePosition=strpos($id, '_'))!== false)
		{
			$id = substr($id, 0, $underscorePosition);
		}
		return $id;
	}
public function getLanguageID($id)
	{
		// normalize id
		$id = $this->getCanonicalID($id);
		// remove sub tags
		if(($underscorePosition=strpos($id, '_'))!== false)
		{
			$id = substr($id, 0, $underscorePosition);
		}
		return $id;
	}
public function getLanguageID ( $ id ) { // normalize id $ id = $ this -> getCanonicalID ( $ id ) ; // remove sub tags if ( ( $ underscorePosition = strpos ( $ id , '_' ) ) !== false ) { $ id = substr ( $ id , 0 , $ underscorePosition ) ; } return $ id ; }
Converts a locale ID to a language ID.
A language ID consists of only the first group of letters before an underscore or dash.
@param string $id the locale ID to be converted
@return string the language ID
@since 1.1.9
Converts a locale ID to a language ID . A language ID consists of only the first group of letters before an underscore or dash .