Magic method enabling `language`, `script`, `territory` and `variant` methods to parse and retrieve individual tags from a locale.
{{{ Locale::language('en_US'); // returns 'en' Locale::territory('en_US'); // returns 'US' }}}

Parameters

  • string $method
  • array $params

Returns

mixed

Source

						public static function __callStatic($method, $params = array()) {
		$tags = static::invokeMethod('decompose', $params);

		if (!isset(static::$_tags[$method])) {
			throw new BadMethodCallException("Invalid locale tag `{$method}`.");
		}
		return isset($tags[$method]) ? $tags[$method] : null;
	}