Search ads uchun api chiqarildi

This commit is contained in:
2025-11-27 15:02:23 +05:00
parent 94f129c446
commit 02fd95fe1f
12 changed files with 206 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
from .cache import * # noqa
from .console import * # noqa
from .core import * # noqa
from .language import * # noqa

8
core/utils/language.py Normal file
View File

@@ -0,0 +1,8 @@
def get_request_lang(request):
lang = request.headers.get("Accept-Language", "uz")
lang = lang.split(",")[0].split("-")[0].lower()
if lang not in ["uz", "ru", "en"]:
lang = "uz"
return lang