简体   繁体   English

如何在我的iOS应用中添加RTL支持

[英]How to add rtl support to my ios app

I am localizing my app and wanted to add some rtl support as well (my app is currently in ltr). 我正在本地化我的应用程序,还想添加一些rtl支持(我的应用程序当前在ltr中)。

What would be the best approach for providing such localization? 提供这种本地化的最佳方法是什么? I was thinking of creating different xib's for rtl and ltr, but then how would I load the correct one? 我当时在考虑为rtl和ltr创建不同的xib,但是那我将如何加载正确的xib?

I asked a question similar to yours not so long ago: How does waze change objects location with their localization? 不久前,我问了一个与您类似的问题:位智如何通过对象的本地化改变对象的位置?

Your best bet would be to use a different xibs \\ StoryBoard and differentiate between the two after checking the local settings. 最好的选择是使用其他xibs \\ StoryBoard,并在检查本地设置后区分两者。 You could also ask the user for his native language to trigger the right StoryBoard (some users like to have controler of the language they are getting, even if there phone is in another language) If you are going to support iOS 6 and there is a way achieving the above with AutoLayout but I'm not sure that's what you are looking for. 您还可以要求用户提供其母语以触发正确的StoryBoard(某些用户喜欢控制他们所获得的语言,即使手机使用的是其他语言)也要支持iOS 6,并且通过自动AutoLayout实现上述AutoLayout但我不确定这就是您要寻找的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM