mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-07-04 20:25:25 +02:00
Add basic Dutch translations by jelle619 and translation scripts
This commit is contained in:
@ -6,6 +6,7 @@ from titanembeds.utils import rate_limiter, discord_api, socketio, babel
|
||||
from .blueprints import api, user, admin, embed, gateway
|
||||
import os
|
||||
from titanembeds.database import get_administrators_list
|
||||
from titanembeds.i18n import LANGUAGES
|
||||
|
||||
try:
|
||||
import uwsgi
|
||||
@ -41,6 +42,13 @@ app.register_blueprint(user.user, url_prefix="/user", template_folder="/template
|
||||
app.register_blueprint(embed.embed, url_prefix="/embed", template_folder="/templates")
|
||||
socketio.on_namespace(gateway.Gateway('/gateway'))
|
||||
|
||||
@babel.localeselector
|
||||
def get_locale():
|
||||
param_lang = request.args.get("lang", None)
|
||||
if param_lang in LANGUAGES:
|
||||
return param_lang
|
||||
return request.accept_languages.best_match(LANGUAGES.keys())
|
||||
|
||||
@app.route("/")
|
||||
def index():
|
||||
return render_template("index.html.j2")
|
||||
|
Reference in New Issue
Block a user