On Jul 1, 2011, at 11:39, Ulf Dunkel wrote: Hi Christiaan. However this approach does not take care of localization dependent UI layout, which you still have to do yourself if it's needed, in code. So wether this kind of approach is useful for you depends very much on how complex and localization dependent this layout is.
What exactly do you mean by 'localization dependent UI layout' here? Are you talking about different NIB layouts for different localized languages?
Yes.
These problems are exactly why I am saying this. The link says essentially that for some layouts you can, and should, reserve enough space in the elements with text. This is why I say it depends on how complex your UI is. For more complex this is not feasible, or it doesn't look right, and you need to do something else.
Maybe this helps others to use the "One For All" NIB layout method, too. Doing localization for years now, we have seen that this is the only way to really avoid hazzles and inconsistencies during the lifetime of apps with all their updates and upgrades.
I partly disagree. For some layout problems it is very well doable to adjust some layout in code, and it's really no pain and not much maintenance. In fact, it is even better for consistency, as IME often the explicitly localized layouts are very hard to keep consistent, especially if the localizers do the layout. Again, it depends on how complex your UI is.
For instance, I have defined a function that takes an array of buttons and smartly auto-sizes it in a perfect right-to-left row (trying to make them the same size, unless they become too big, but with a minimum size, etc), a common configuration. Just adding the IBOutlets and using this function in windowDidLoad is far less pain and leads to a more consistent layout for the buttons in all localizations than having to adjust the localized NIBs every time some changes are made. And it looks better than needing buttons that are large enough for all localizations (something that is also very hard to determine). PS: Of course this can be done either programmatically using something like suggested in this thread by Torsten Curdt (referring on https://github.com/tcurdt/localizer), or using iLocalize and have your localizers check everything visually while they do the localization. PS2: Yes, AppleGlot sucks. ---Ulf Dunkel
|