我们在应用程序中大量使用格式化器,以获取数字和日期/时间。而且我们发现,当设备的语言是阿拉伯语时,该应用看起来不太好,例如,这是我们不支持的语言。例如,请参阅此屏幕截图,例如,对于设备的语言,具有阿拉伯语设置的设备(没有其他语言添加到设备的首选项中):
局部免费试用期在阿拉伯语中显示。底部的数字。以及应用程序中的所有日期/时间也以阿拉伯语为单位。
英语被视为开发语言,但这似乎还不够。然后我阅读和我的理解是,英语应该是将其设置为开发语言的语言。
格式化/本地化方法也不遵守相同的规则吗?
如果应用程序不支持设备的语言,是否有一种方法可以强制使用英语/本地化方法使用英语?
编辑:
只需将设备的语言切换到日语和俄语,同样的观点完全可以根据需要用英语显示出来,因此不确定问题到底是什么。
We make heavy use of formatters in the app for numbers and date/time. And we found out that the app doesn't look nice when the device's language is Arabic for example, which is a language we don't support. See this screenshot for example for a device with Arabic set as the device's language (no other languages added to device's preferences):

The localised free trial period is shown in Arabic. The numbers at the bottom as well. And all dates/times in the app show in Arabic as well.
English is set as the development language, but that doesn't seem to be enough. And I read How iOS Determines the Language For Your App and my understanding is that English should've been the language used as it is set as the development language.
Do formatters/localisation methods not follow the same rules as well?
Is there a way to force formatters/localisation methods to use English if the device's language is not supported by the app?
Edit:
Just switched the device's language to Japanese and Russian and the same view showed completely in English, as desired, so not sure what exactly the issue is.
发布评论
评论(1)
是的,您可以指定格式化器的
locale
:Yes you can specify the
Locale
of a formatter: