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

手机设定不同系统语言时,IntlPhoneInput可能不能使用 #2

Closed
yimingyu opened this issue Jan 13, 2017 · 1 comment
Closed

Comments

@yimingyu
Copy link
Collaborator

yimingyu commented Jan 13, 2017

原因是IntlPhoneInput内部使用的google号码识别插件,这个插件https://github.com/googlei18n/libphonenumber
识别号码时根据本地语言对同一号码识别结果不同
测试地址:http://libphonenumber.appspot.com/
另外,不同本地系统语言时,IntlPhoneInput输入框不一样,UnitedStates会每隔三个数字添加一个"-",日文会添加空格,而中文不会添加任何符号
qq 20170113195036
qq 20170113195044
qq 20170113195147

@yimingyu
Copy link
Collaborator Author

1、Locale.getDefault().getCountry()返回结果是手机设置的系统语言所在国家,我的手机语言选择英文时,返回结果是美国US。
2、从上面三张图片可以看出操作系统选择不同语言时,显示的国家仍然是中国。调试发现程序中确实通过TelephonyManager.getNetworkCountryIso()设置了相应国家,但是没有更新界面,显示的中国是在xml中写死的。

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

1 participant