Ho do you change Base language to other than english?

I'm developing an app where the client wants to develop his app in Spanish only. But I can not understand Spanish, that's why my plan is if somehow I can change the default (Base) language to Spanish but I'll keep the development language as English.

How can I change the Base language to Spanish? I want all users (who have set Spanish or then Spanish) in Spanish only. But Only if I run from my Xcode (e.g. Debug) then and only then English should appear.

Replies

  • I've seen this, but he/she is asking for changing the development language to other than English. While I'm asking for a change in Base language. I want to keep development language to English.

Add a Comment

Unfortunately, there isn't an easy to way to accomplish this. The general recommendation is to allow the OS to pick the correct language to run the app based on the user's preferred language settings. For this case, if a user is running their device in Spanish then the app will launch in Spanish and they'll have no idea that an English localization exists (or that it's the default localization). If you have a hard requirement from your client to not include an English localization, you have a few options:

  1. Use Spanish strings in your code and change the value of CFBundleDevelopmentRegion in your app to reflect es as the default language
  2. Use string identifiers in your code (ex: HELLO_WORLD) and maintain .strings file for English and Spanish (ex: HELLO_WORLD = "Hello, world!";). Then you might be able to add a Run Script phase that removes everything in en.lproj in your application bundle at build time.