Waze如何通过本地化改变对象的位置? [英] How does waze change objects location with their localization?

查看:267
本文介绍了Waze如何通过本地化改变对象的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第一个图像是语言设置为希伯来语,第二个图像是英语。看看图像中的谢谢:一词。 Waze如何设法将单词的位置更改为从右到左语言?定期本地化



感谢:x



ת视讯:X



这只是一个例子。 Waze做了很多。



Waze支持iOS 4.3及更高版本,因此AutoLayout不再是问题。与常规本地化我知道你可以改变的单词的内容,但位置?



如果 iphone语言是英语,则可以设置 code>将布局更改为..? (如果这是很多ifs ..
感谢



>

b>

1.使用本地化的.xib文件,可以使用本地化的.xib文件文件或甚至完整的storyboards
2.以编程方式改变获取当前的本地化并添加一些IF到视图控制器并重新排列项目如果这是在一个自定义的UITableViewCell子类,然后覆盖layoutSubViews(或者),并根据区域设置更改布局。如果你在cellForRowAtIndexPath中布局,然后在那里应用本地化。


The first image is when the language is set to Hebrew, the second is in English. Look at the word " Thanks: " in the image. How Waze managed to change the location of the word to a Right To Left language? With regular localization

Thanks:x

should have been

תודות:X

That's just one example. Waze does that a lot.

Waze supports iOS 4.3 and later so AutoLayout is out of the question. With regular localization I know you can change the content of the word but location? that's a first.

Can I set an if iphone language is English then change the layout to..? (if so that's a lot of ifs.." Thanks

解决方案

Frankly, I do not know if there is any standarized way of doing that. But I see several options: 1. Using localized .xib files or even full storyboards. 2. Changing that programmatically. Get the current localization and add some IFs to the view controller and re-arrange the items. If this is in a custom UITableViewCell subclass then overwrite the layoutSubViews (or so) and change the layout accoring to the locale settings. If you layout it within cellForRowAtIndexPath then apply the localization there.

这篇关于Waze如何通过本地化改变对象的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆