eskp.py
changeset 1040 ee422f2e89c1
parent 1019 ba828373ac1d
child 1053 878b81ffb8f7
equal deleted inserted replaced
1039:9107c2043b64 1040:ee422f2e89c1
   163     return html
   163     return html
   164 
   164 
   165 
   165 
   166 @babel.localeselector
   166 @babel.localeselector
   167 def get_locale():
   167 def get_locale():
   168     """ToDo: if translation is completed, switch to en """
   168     requested_language = request.accept_languages.best_match(LANGUAGES.keys())
   169     return LANGUAGE_SELECTED or request.accept_languages.best_match(LANGUAGES.keys()) or 'de'
   169     if requested_language in ("de", "en"):
   170 
   170         return requested_language or "de"
   171 
   171 
   172 @app.route("/")
   172 @app.route("/")
   173 @app.route("/index")
   173 @app.route("/index")
   174 def index():
   174 def index():
   175     return render_template("/index.html",
   175     return render_template("/index.html",
Impressum Datenschutzerklärung