国际化支持
This commit is contained in:
@@ -1102,6 +1102,13 @@ async def main_page():
|
||||
"Expires": "0"}
|
||||
return FileResponse(index_path, headers=no_cache_headers)
|
||||
|
||||
@app.get("/EN", response_class=HTMLResponse, include_in_schema=False)
|
||||
async def main_page_EN():
|
||||
index_path = Path(STATIC_DIR) / "index_EN.html"
|
||||
if not index_path.exists(): raise HTTPException(status_code=404, detail="index_EN.html not found")
|
||||
no_cache_headers = {"Cache-Control": "no-store, no-cache, must-revalidate, max-age=0", "Pragma": "no-cache",
|
||||
"Expires": "0"}
|
||||
return FileResponse(index_path, headers=no_cache_headers)
|
||||
|
||||
@app.get("/admin", response_class=HTMLResponse, include_in_schema=False)
|
||||
async def main_page_admin():
|
||||
|
||||
File diff suppressed because one or more lines are too long
1
docutranslate/static/index_EN.html
Normal file
1
docutranslate/static/index_EN.html
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user