diff --git a/tornado/locale.py b/tornado/locale.py index 52aa1af9d5..aea9e1f3bb 100644 --- a/tornado/locale.py +++ b/tornado/locale.py @@ -248,6 +248,10 @@ def get_closest(cls, *locale_codes: str) -> "Locale": return cls.get(code) if parts[0].lower() in _supported_locales: return cls.get(parts[0].lower()) + if len(parts) == 1: + for supported in _supported_locales: + if parts[0].lower() == supported.split("_")[0]: + return cls.get(supported) return cls.get(_default_locale) @classmethod