mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-09-11 11:50:17 +08:00
Send language when fetching available tasks
This commit is contained in:
@@ -15,7 +15,7 @@ const LOCALE_SET = new Set(i18n.locales);
|
||||
* the i18n module.
|
||||
* 3. "en" as a final fallback.
|
||||
*/
|
||||
const getUserLanguage = (req: NextApiRequest) => {
|
||||
const getUserLanguage = (req: NextApiRequest): string => {
|
||||
const cookieLanguage = req.cookies["NEXT_LOCALE"];
|
||||
if (cookieLanguage) {
|
||||
return cookieLanguage;
|
||||
|
||||
Reference in New Issue
Block a user