MCPcopy Create free account
hub / github.com/EasyIME/PIME / get_user_locale

Method get_user_locale

python/python3/tornado/web.py:1275–1283  ·  view source on GitHub ↗

Override to determine the locale from the authenticated user. If None is returned, we fall back to `get_browser_locale()`. This method should return a `tornado.locale.Locale` object, most likely obtained via a call like ``tornado.locale.get("en")``

(self)

Source from the content-addressed store, hash-verified

1273 self._locale = value
1274
1275 def get_user_locale(self) -> Optional[tornado.locale.Locale]:
1276 """Override to determine the locale from the authenticated user.
1277
1278 If None is returned, we fall back to `get_browser_locale()`.
1279
1280 This method should return a `tornado.locale.Locale` object,
1281 most likely obtained via a call like ``tornado.locale.get("en")``
1282 """
1283 return None
1284
1285 def get_browser_locale(self, default: str = "en_US") -> tornado.locale.Locale:
1286 """Determines the user's locale from ``Accept-Language`` header.

Callers 1

localeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected