Custom header link locale is not working for some languages

最近我尝试配置自定义头部链接,使其根据特定的语言(地区)显示,但发现这个功能在某些语言(如 zh_CN 和 en_BG)上并不能正常工作……似乎只要字符串中间有 “_” ,就不能正常工作,而 “fr” “ca” “en” 这些则表现得很顺利。

我已经尝试了以下方法:

首先将论坛区域设置为 “en”,然后将自定义头部链接的区域设置为 zh_CN。
我用另一个普通用户登录,设置界面语言为 zh_CN,但头部不会显示出来。

然后我还尝试将论坛区域设置为 “en”,再将自定义头部链接的区域设置为 “ca”,用另一个普通用户登录并设置界面语言为 “ca”,这样头部就会显示出来。

这表明 zh_CN 并没有像预期的那样工作。

非常感谢如果有人能帮我解决这个问题,让 zh_CN 语言能够正常工作。

提前谢谢!

1 Like

a dash should work, zh-CN, that’s the web format

no way for you to have known of course, so we should correct this — once this update lands either - or _ will work

3 Likes

is there any possible to make multiple language points to one locale string settigns?

for example locale: “en-US, en-UK” since for me most of the cases should be the same therefore if possible to make it as one line configuration would be much better then use two exactly the same objects for only update the en-US to en-UK

1 Like

It’s not currently possible, but should be doable. I can give it a try when I have some time (or someone else can feel free to make a pull request!)

Wouldn’t just en do the job?

not really the en present for en-US and en-GB present for en-UK you can give a try


you can give a try but yeah that’s not a big deal as long as I know the right way to reference the proper file which is “-” instead of “_” is good enough.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.