【网站语言】blog.config.js配置中选择英文,然而任然是中文界面 #1986
Unanswered
Tianqi-Yao
asked this question in
Q&A
Replies: 2 comments
-
blog.config.js 中配置的是默认语言,但是网站会自动切换成当前访问者的浏览器语言,后者优先级更高。 按您需求,我会提交一个补丁,屏蔽掉自动切换网站语言的功能 |
Beta Was this translation helpful? Give feedback.
0 replies
-
我将Notion Config中的LANG配置项关闭,在blog.config.js中配置 LANG: 'zh-CN' |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
描述bug
LANG: process.env.NEXT_PUBLIC_LANG || 'en-US'
复现步骤
blog.config.js中 LANG默认配置是
LANG: process.env.NEXT_PUBLIC_LANG || 'zh-CN'
改为
LANG: process.env.NEXT_PUBLIC_LANG || 'en-US'
期望的正常结果
希望变成英文界面
截图
![Screenshot 2023-09-22 at 12 00 29 PM](https://private-user-images.githubusercontent.com/25485117/270005511-6901efaf-d3fe-4d5a-b91e-714d7039dcd1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU5NjUwNjksIm5iZiI6MTcyNTk2NDc2OSwicGF0aCI6Ii8yNTQ4NTExNy8yNzAwMDU1MTEtNjkwMWVmYWYtZDNmZS00ZDVhLWI5MWUtNzE0ZDcwMzlkY2QxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEwVDEwMzkyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk1ZDg1NzE0ZTZiMDgwNGFkODkzZGRmNDZkZWIwOTU5YzYwNjJiODEzY2ZlZmYwMDQ5OGQ3NTFlYWQ5Y2M0M2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ccdvbRrIVipL6RN07ruKKV5udyPaEoEReJyijIHJvUA)
这里的一些文字应该显示英文,但实际显示的是中文
环境
补充说明
![Screenshot 2023-09-22 at 11 59 14 AM](https://private-user-images.githubusercontent.com/25485117/270005234-a7e3042f-944e-4a7d-a5d0-35c1c6ad19e2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU5NjUwNjksIm5iZiI6MTcyNTk2NDc2OSwicGF0aCI6Ii8yNTQ4NTExNy8yNzAwMDUyMzQtYTdlMzA0MmYtOTQ0ZS00YTdkLWE1ZDAtMzVjMWM2YWQxOWUyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEwVDEwMzkyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI5ZGM0MDA0NzZjYzQ2NTgxNDZmNjg0MDI4NGFkNGRhNDU5OTMzNzk0MTlmMTE5YjhhYTFjZDMwMzA5NDQzNDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.63BDJCApXLktYvhRAPlJgTaP25knF9KKgMqt_VxvKmQ)
在themes/hexo/components/MenuGroupCard.js输出 local 变量,发现一开始是英文,后面被别的代码改回了中文
Beta Was this translation helpful? Give feedback.
All reactions