public static function sanitizeCountry($locale, $default = null)
    {
        if ($locale instanceof Locale) {
            return $locale->getCountry();
        }

        if ($default) {
            $default = Locale::sanitizeCountry($default, null);
        }

        $locale = (string) $locale;
        $locale = trim($locale);

        if (!$locale || !preg_match("/(?<country>[a-z]{2})$/ui", $locale, $found)) {
            return $default;
        }

        return Text::toUpper($found['country']);
    }