Search code examples
iosobjective-clocalizationlocalizable.strings

Which line of code I have to write for Localization?


code 1 :

cell.textLabel.text = LocalizedString(@"nice title");

code 2 :

cell.textLabel.text = LocalizedString(@"nice title",nil);

What is the difference between them ?

which one is correct and can be used ?


Solution

  • You should write it like this

    cell.textLabel.text = NSLocalizedString(@"nicetitle",@"comment goes here");
    

    enter image description here