Category: Development Tips
Tags: Xcode, Swift, SwiftUI, Localization, iOS Simulator, macOS
When developing multilingual apps, testing different languages can quickly become time-consuming.
Fortunately, both iOS Simulator and macOS support launching an application directly in a specific language — without changing the system language.
This is particularly useful for testing translations, checking layouts, and creating localized App Store screenshots.
1. Using Xcode #
The easiest approach is built directly into Xcode.
- Open Product → Scheme → Edit Scheme.
- Select Run → Options.
- Find App Language.
- Select the desired language.
- Optionally, select an App Region.
- Run the application.
Xcode will launch the app using the selected language.
This works for both iOS Simulator and macOS applications.
The language setting affects the application, not the entire operating system.
2. Launching an iOS App Using Terminal #
For automated workflows, Xcode’s command-line tools provide another option.
Assuming the application is already installed and the simulator is running:
xcrun simctl launch booted com.example.myapp \
-AppleLanguages "(de)" \
-AppleLocale "de_DE"
This launches the app in German.
To launch it in French:
xcrun simctl launch booted com.example.myapp \
-AppleLanguages "(fr)" \
-AppleLocale "fr_FR"
Replace com.example.myapp with the application’s bundle identifier.
Important: The application must support the requested language. Otherwise, it may fall back to another available localization.
3. Launching a macOS App in a Specific Language #
The same principle works with native macOS applications.
Open Terminal and execute:
open -a "/Applications/MyApp.app" --args \
-AppleLanguages "(de)" \
-AppleLocale "de_DE"
This starts the application with German as its preferred language.
For French:
open -a "/Applications/MyApp.app" --args \
-AppleLanguages "(fr)" \
-AppleLocale "fr_FR"
Make sure the application is completely closed before restarting it with different language arguments.
4. Understanding the Parameters #
Two launch arguments control localization:
| Argument | Purpose | Example |
|---|---|---|
-AppleLanguages | Preferred application language | (de) |
-AppleLocale | Regional formatting preferences | de_DE |
Language and region are separate settings.
For example:
-AppleLanguages "(de)" -AppleLocale "de_CH"
This requests German as the application language, with Swiss regional formatting preferences.
That distinction matters when testing dates, numbers, currencies, and other localized content.
5. Creating Localized Screenshots #
One particularly useful application of this technique is generating screenshots for multiple App Store languages.
A typical workflow could be:
- Launch the application in German.
- Navigate to the desired screen.
- Capture a screenshot.
- Restart the application in French.
- Capture the same screen again.
- Repeat for all supported languages.
For iOS Simulator, screenshots can also be captured from Terminal:
xcrun simctl io booted screenshot screenshot.png
This makes it possible to automate substantial parts of the localization testing and screenshot creation process.
One limitation: Launch arguments change the application’s localization, not necessarily every system interface displayed by the simulator.
Conclusion #
Testing multilingual applications doesn’t require repeatedly changing device or macOS language settings.
Xcode provides a convenient graphical solution, while launch arguments make the same process available to command-line tools and automation.
For developers supporting many languages, this can save considerable time — especially when preparing localized screenshots for App Store Connect.
References: Apple – Testing Localizations · Apple – Testing Your Internationalized App
Suggested WordPress excerpt:
Learn how to launch iOS Simulator and macOS applications in a specific language using Xcode or Terminal. Perfect for localization testing and automated App Store screenshots.