Swift 3 / Xcode 8 - How to change the native language of my App?

Asked

Viewed 1,003 times

7

I’m finishing an application and I couldn’t help but notice that some components of my app are in English:

Itens de contexto

Edit action do meu tableview

How to change the app’s native language?
How to make it change automatically according to the language of my device?

  • https://www.raywenderlich.com/64401/internationalization-tutorial-for-ios-2014

2 answers

6


To do this, you must use Portuguese as a language in your project.

By default, the base language is English. To add another language, go to:

inserir a descrição da imagem aqui

  1. Access your . xcodeproject;
  2. In the upper left corner, choose your project instead of your target;
  3. Under "Localizations", add the language in question.

By doing this, Xcode gives you the option to translate all documents from your project (applicable, usually . string, . xib and . storyboard).

If you add a file after configuring the new language and want to include it in Localizations also, you must access:

inserir a descrição da imagem aqui

  1. Click on "Locate..."

inserir a descrição da imagem aqui

  1. Add the missing language.

If you’re using Portuguese as the language on your device, this will cause iOS to "translate" system components into your app.

To learn more about Internationalization, here is a very good tutorial from Ray Wenderlich: https://www.raywenderlich.com/64401/internationalization-tutorial-for-ios-2014

5

To change only the base language, go to the folder where your project is located and open the contents of the project package: inserir a descrição da imagem aqui Then open the file project.pbxproj with the Text Editor. Once done, give a Command+F and look for "English". Now it’s easy, just change the English for Portuguese and the en for pt:inserir a descrição da imagem aqui

  • Remembering that this way you will be changing the Development Language of your app to Brazilian Portuguese.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.