1

I have around 1000 strings from storyboards and .m files which are converted for French Language. I need to add more strings to the same project. How do I update the strings file for my project?

Thanks

  • Why are you using Xcode 5? – wakachamo Aug 21 '15 at 10:54
  • I have xcode 6 also which will create xliff file for all strings, but we follow manual translating method, so its not much of help. I need to know how we update the existing strings file with new strings added in code and views in storyboard. – user2871193 Aug 21 '15 at 13:43

1 Answers1

1

Usually people put all localization is in Localizable.strings file. If you want to add more string simply add "KEY" = "TRANSLATION"; to that file and use NSLocalizedString(key, comment) in your project where it is needed.

If you want to localize storyboard and/or nib files then you have to enable Base Internationalization in project settings.

gontovnik
  • 690
  • 5
  • 9
  • I need to know how we update the existing strings file with new strings added in code and views in storyboard. And the existing strings are already translated. Just need to update english and french strings file wit new strings. – user2871193 Aug 21 '15 at 13:48
  • If you need to add new strings, just simply add them to the **Localizable.strings** file and use in code where it is needed. I prefer not localizing storyboard and setting string values in code, then it is much easier to manage in the future. – gontovnik Aug 21 '15 at 15:01
  • Hi...Adding strings in localizable.strings will work for strings in .m files. But if I keep adding view controller in storyboard then handling translation in code will increase code size. Is there any way to update the strings in storyboard maintainig the earlier translations? – user2871193 Aug 22 '15 at 08:02
  • You are software engineer, why you are afraid of code getting bigger and bigger? If you want to localize storyboard/nibs, then on project page you should enable "Use Base Internationalization". – gontovnik Aug 22 '15 at 08:12
  • Thanks Danil. I'm not afraid of code getting bigger, the code maintenance gets difficult, when multiple developers will work on it. I have enabled base Internationalization in my project. – user2871193 Aug 22 '15 at 13:57