Answer the question
In order to leave comments, you need to log in
How to organize a multilingual site on FLASK like site.com/en/ site.com/ru/?
Subject.
I use Flask+babel but I don't like how it gets indexed by search engines.
I would like to separate sites of different translations.
Or maybe someone will tell you how to do it so that everything is top type with search engines, and change the site language by ?lang=ru
How to do it right? =)
Thank you.
Answer the question
In order to leave comments, you need to log in
Can be put in before_request
@app.before_request
def before_request():
lang = request.args.get('lang')
app.register_blueprint(main, url_prefix='main/<lang>/')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question