Commit 450e2093 authored by confusion's avatar confusion

添加翻译

parent 7042fe41
......@@ -17,9 +17,9 @@ router = APIRouter()
def lang_to_label(lang):
if lang == 'en':
if lang == 'en-US':
label = 'en_label'
elif lang == 'zh':
elif lang == 'zh-CN':
label = 'label'
else:
label = 'en_label'
......
......@@ -28,7 +28,7 @@ def get_current_user(credentials: HTTPAuthorizationCredentials = Security(jwt_to
def get_accept_language(request: Request) -> str:
lang = request.headers.get('Accept-Language', 'en')
lang = request.headers.get('Accept-Language', 'en-US')
return lang
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment