From 4f0cb466997a473471ef65583a2a54e3749ade36 Mon Sep 17 00:00:00 2001 From: Bowen Liang Date: Sun, 8 Jun 2025 09:45:44 +0800 Subject: [PATCH] fix getDocLink --- web/context/i18n.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/context/i18n.ts b/web/context/i18n.ts index 04d49d2808..7a94b49654 100644 --- a/web/context/i18n.ts +++ b/web/context/i18n.ts @@ -38,8 +38,8 @@ export const useGetPricingPageLanguage = () => { const baseDocUrl = 'https://docs.dify.ai' export const getDocLink = (path: string) => { - const docLanguage = getLocaleOnClient() === 'zh-Hans' ? '/zh-hans' : '/' - return `${baseDocUrl}${docLanguage}/${path}` + const docLanguage = getLocaleOnClient() === 'zh-Hans' ? '/zh-hans' : '/en' + return (path.startsWith('/')) ? `${baseDocUrl}${docLanguage}${path}` : `${baseDocUrl}${docLanguage}/${path}` } export default I18NContext