Reputation: 7067
I thought I read this somewhere but can't find it here or on the web. Was I dreaming?
When testing auto layouts and localizations, is there a way in XCode to add an argument to a scheme for it to change the English text to longer text for testing purposes to make sure the layouts adjust to longer languages?
Upvotes: 5
Views: 1932
Reputation: 150675
You weren't dreaming, it was demonstrated in one of the WWDC13 videos. The key you are looking for is:
NSDoubleLocalizedStrings
which doubles the localised strings that your application uses, which means that UI elements that load these strings will be enlarged and you can see that your auto layouts can handle the newly constrained objects.
Upvotes: 3
Reputation: 4480
Abizern has the correct answer, but a typo. The correct key is NSDoubleLocalizedStrings (note the ending "s"). Add this as an argument passed on launch, like
-NSDoubleLocalizedStrings YES
Upvotes: 4
Reputation: 2976
Go to Product->Scheme->Edit scheme. Choose Run section on the left and add to "Arguments Passed On Launch" this (for example):
-AppleLanguages "(Italian)"
To make it more relevant, here is helpful post on NSHipster: http://nshipster.com/launch-arguments-and-environment-variables/
Upvotes: 6