public static function canonicalize($locale) {
		$tags = static::decompose($locale);

		foreach ($tags as $name => &$tag) {
			foreach ((array) static::$_tags[$name]['formatter'] as $formatter) {
				$tag = $formatter($tag);
			}
		}
		return static::compose($tags);
	}
public static function canonicalize($locale) {
		$tags = static::decompose($locale);

		foreach ($tags as $name => &$tag) {
			foreach ((array) static::$_tags[$name]['formatter'] as $formatter) {
				$tag = $formatter($tag);
			}
		}
		return static::compose($tags);
	}
public static function canonicalize ( $ locale ) { $ tags = static :: decompose ( $ locale ) ; foreach ( $ tags as $ name => & $ tag ) { foreach ( ( array ) static :: $ _tags [ $ name ] [ 'formatter' ] as $ formatter ) { $ tag = $ formatter ( $ tag ) ; } } return static :: compose ( $ tags ) ; }
Returns a locale in its canonical form with tags formatted properly.

@param string $locale A locale in an arbitrary form (i.e. `'ZH-HANS-HK_REVISED'`).
@return string A locale in its canonical form (i.e. `'zh_Hans_HK_REVISED'`).
Returns a locale in its canonical form with tags formatted properly .