Skip to content
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

语言切换成阿拉伯语报错 #12

Open
zhangbaoquan opened this issue Oct 22, 2024 · 2 comments
Open

语言切换成阿拉伯语报错 #12

zhangbaoquan opened this issue Oct 22, 2024 · 2 comments

Comments

@zhangbaoquan
Copy link

WX20241022-175947@2x
日语正常,唯独阿拉伯语异常

@Kxmrg
Copy link
Owner

Kxmrg commented Oct 22, 2024

该问题与框架无关,报错日志很明显是MaterialLocalizations代理的问题,尝试修改localizationsDelegates相关参数

@zhangbaoquan
Copy link
Author

非常感谢你的回复,顺着你的方向我找到了原因。
这个问题和语言代码有关,我查的沙特阿拉伯的语言代码是ar_SA,国家码是SA,因此语言码用的ar_SA,
但是我看internacionalization.dart 里有如下代码
const List rtlLanguages = [
'ar', // Arabic
'fa', // Farsi
'he', // Hebrew
'ps', // Pashto
'ur',
];

这些是需要RTL的,其中ar 表示的是阿拉伯语,ar 包含所有阿语系,我把ar_SA 改成 ar就显示正常了,国家码还是SA。不过这里系统不识别ar_SA 还是很奇怪。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants