-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐞 Bug Report: App language does not change after update language orders in system settings #305
Comments
After debugging I found A similar issue in https://stackoverflow.com/questions/24841113/override-applelanguages-in-nsuserdefaults ,
which is pretty like what we do in @tisfeng appreciate it if you could confirm it. |
使用 [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"] 方式获取系统语言并不好,遇到特殊语言,如 Canadian English 会导致语言解析有问题。后面我改成了 [NSLocale preferredLanguages]
另外,一般我们也没必要修改 AppleLanguages,之前我修改这个值是为了测试,后面忘记移除了。 具体你可以看 localization 分支的这个提交 e8923f0 |
Yes, I think the
Yeah, we should not update this. After removing Do you have a plan to merge the commit into dev or apply a new commit to fix this? |
你测一下看这个提交 e8923f0 会有你说的问题吗? 如果没问题,稍后我就把它 pick 过来。 |
I tested but it's not working as expected. I think the reason is the app has changed the A workaround is to reset this value when |
行,那麻烦你修复一下这个问题,可以把 e8923f0 pick 过去,弄个新 PR。 |
Sure, will create one later. |
…306) * perf: use NSLocale.preferredLanguages instead of NSUserDefaults AppleLanguages * bugfix: #305 reset AppleLanguages values --------- Co-authored-by: tisfeng <[email protected]>
…306) * perf: use NSLocale.preferredLanguages instead of NSUserDefaults AppleLanguages * bugfix: #305 reset AppleLanguages values --------- Co-authored-by: tisfeng <[email protected]>
…306) * perf: use NSLocale.preferredLanguages instead of NSUserDefaults AppleLanguages * bugfix: #305 reset AppleLanguages values --------- Co-authored-by: tisfeng <[email protected]>
2.6.0 新版本已修复该问题。 |
Please confirm the following:
Problem description
App language does not change after updating language orders in system settings.
You can check the screenshot attached below.
After changing preferred languages to (1. 简体中文 2. English) in System Settings, the result from
[[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"]
in app isbut in the terminal the result is
Reproduction steps
Screenshot
Expected result
App language follows system settings
Proposed solution (optional)
No response
Device type and OS version
MacOS 14.2.1, Easydict 2.5.0
Are you willing to submit a PR to fix this issue?
The text was updated successfully, but these errors were encountered: