framework/i18n/CLocale.php
public function getScriptID($id)
	{
		// normalize id
		$id = $this->getCanonicalID($id);
		// find sub tags
		if(($underscorePosition=strpos($id, '_'))!==false)
		{
			$subTag = explode('_', $id);
			// script sub tags can be distinguished from territory sub tags by length
			if (strlen($subTag[1])===4)
			{
				$id = $subTag[1];
			}
			else
			{
				$id = null;
			}
		}
		else
		{
			$id = null;
		}
		return $id;
	}
public function getScriptID($id)
	{
		// normalize id
		$id = $this->getCanonicalID($id);
		// find sub tags
		if(($underscorePosition=strpos($id, '_'))!==false)
		{
			$subTag = explode('_', $id);
			// script sub tags can be distinguished from territory sub tags by length
			if (strlen($subTag[1])===4)
			{
				$id = $subTag[1];
			}
			else
			{
				$id = null;
			}
		}
		else
		{
			$id = null;
		}
		return $id;
	}
public function getScriptID ( $ id ) { // normalize id $ id = $ this -> getCanonicalID ( $ id ) ; // find sub tags if ( ( $ underscorePosition = strpos ( $ id , '_' ) ) !== false ) { $ subTag = explode ( '_' , $ id ) ; // script sub tags can be distinguished from territory sub tags by length if ( strlen ( $ subTag [ 1 ] ) === 4 ) { $ id = $ subTag [ 1 ] ; } else { $ id = null ; } } else { $ id = null ; } return $ id ; }
Converts a locale ID to a script ID.
A script ID consists of only the last four characters after an underscore or dash.
@param string $id the locale ID to be converted
@return string the script ID
@since 1.1.9
Converts a locale ID to a script ID . A script ID consists of only the last four characters after an underscore or dash .