Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug Xcode apps in a specific locale (English, say)?

When I develop a Mac app with localized interface with Xcode, I tend to modify the English resources and have them localized/translated only when the rest of the development work is done. Being on a non-English system, when I ask Xcode to run the app, it uses the localization to my own language, when I would want to choose myself (and choose English, in most cases).

So, how do I tell Xcode what language I want the app in during debug sessions?

like image 985
F'x Avatar asked Aug 31 '11 13:08

F'x


People also ask

How do I debug UI in Xcode?

When you run an application in Xcode, the debugger is automatically started and attached to the process of the application. Click the Run button in the top left or press Command + R. From the moment the application is up and running, we can start inspecting the process and, if necessary, debug it.

How can I get system language in iOS?

Starting from iOS 13, users can choose a different language for each of their apps. They can have their device in English, but they can decide to have a specific app in another language. This can be done by navigating to the device Settings, select an app, select language, and change the chosen language.


3 Answers

In current Xcode you can set the Application Language that you launch if you Edit the Scheme and go to the Run options.

Scheme Run Options

like image 51
Alper Avatar answered Nov 08 '22 18:11

Alper


You are probably looking for an answer for Xcode 4.X but I hope that this will help.

In Xcode 3.2.6 in the Groups & Files section of the project window open up the Executable section. Select the executable you want to run in English, and do command I. Click on the "Arguments" tab and then click on the + at the bottom. Then add:

-AppleLanguages "English"

as an argument.

hth

like image 36
Kevin Meaney Avatar answered Nov 08 '22 18:11

Kevin Meaney


If you are debugging on iOS Simulator:

  1. Run iOS Simulator
  2. Click Home Button
  3. Go into it's Settings.app
  4. General
  5. International
  6. Language -> chouse English or any other

If you are debugging on Device - repeat all steps from 2) till 6).

like image 33
Nekto Avatar answered Nov 08 '22 18:11

Nekto