Nslocalizedstring does not return matching text

Asked

Viewed 47 times

3

Personal

I’m using the function NSLocalizedString in an iOS app but this is not returning the related text I put in a file Localization.strings that has the content below. Someone could help me to solve this?

label.text = NSLocalizedString(@"MEDICO", nil);

Filing cabinet:

/* 
  Localization.strings
  Hexapod

  Created by Celso Melero on 08/06/15.
  Copyright (c) 2015 inArts Studio. All rights reserved.
*/

/* Médico */
"MEDICO" = "Doctor";
  • You can put what is appearing on the screen in the component label?

  • 1

    iTSanga, the answer below solved the problem. File name was wrong.

1 answer

3


First make sure you have selected the languages you will support in your project:

Idiomas suportados

Second make sure that you are using the correct name for the location file, it should be named Localizable.strings and not Localization.strings as you put in question:

Arquivos de localização

  • Thank you very much. The file name was wrong even.

Browser other questions tagged

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