0

I would like to know how can I use my Localizable.strings file to translate my widget ?

I try this but it doesn't working:

          _result.text = [NSString stringWithFormat:NSLocalizedString(@"Votre avion a besoin de: %@USG", nil), @((int)number)];
pilou
  • 75
  • 1
  • 7

1 Answers1

0

You need to take the localizable string name in my case is str-name-demo

enter image description here

And you can use like a NSString

// 200 is the parameter
NSString *textStr = [NSString stringWithFormat: NSLocalizedString(@"str-name-demo", nil), 200];

NOTE: I assume you have the more settings ready to user NSLocalizedString method but you can see this tutorial to more understand it.

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

:)

Ladd.c
  • 973
  • 11
  • 11