Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/g/a/gae-init-babel-HEAD/main/auth.py   gae-init-babel(Download)
def check_locale(locale):
  locale = locale.lower()
  if locale not in config.LOCALE:
    locale = config.LOCALE_DEFAULT
  return locale if localedata.exists(locale) else 'en'
      locale = flask.request.accept_languages.best_match(
        matches=config.LOCALE.keys(),
        default=config.LOCALE_DEFAULT)
  return check_locale(locale)
 

src/g/a/gae-init-babel-HEAD/main/main.py   gae-init-babel(Download)
app.jinja_env.globals.update(slugify=util.slugify)
app.jinja_env.globals.update(update_query_argument=util.update_query_argument)
app.config['BABEL_DEFAULT_LOCALE'] = config.LOCALE_DEFAULT
babel = Babel(app)