문제

I'm migrating away from one-XIB-per-locale to a single Base interface with Auto-Layout that is localized using .strings files.

How can I easily preview localized versions of my interface?

I'd like to see how my UI looks in German, Chinese and Arabic without having to change system-wide language preferences each time.

Selecting another language in Interface Builder's "Jump Bar" just shows me raw the .strings file source. IB's "Simulate Document" only shows me document in my current language.

도움이 되었습니까?

해결책

You can launch application in a particular language with an extra argument:

Foo.app/Contents/MacOS/Foo  -AppleLanguages '(de)'

However, that's not enough for Arabic, as it sets the language, but doesn't enable RTL layout:

app -AppleLanguages '(ar)' -NSForceRightToLeftWritingDirection YES -AppleTextDirection YES
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top