Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need to enable Base Internationalization if I do all layouts programmatically?

I'm coding an iPhone/iPad App in Obj-C. From the beginning, I've coded all my layouts (I use Auto Layout) programmatically.

So, now I'm coming to where I want to Internationalize my App and I keep seeing that I need to turn on Base Internationalization.

But, when I read about Base Internationalization does, I read that Base Internationalization separates user-facing code from .storyboard and .xib files.

I have no .storyboard or .xib files. All my user-facing strings make use of NSLocalizedString.

My tentative conclusion is that I don't need to enable Base Internationalization but I want to put this out here as a question in case I'm missing something.

like image 671
Gallymon Avatar asked Apr 28 '18 05:04

Gallymon


1 Answers

You do not need base internationalization if all your strings are already in your code.

You have basically already done the work that base internationalization would have done for you. It would have extracted text from the .xib and .storyboard files and created .strings files to then add the text back via NSLocalizedString.

You can avoid the Xcode warning by checking base internationalization, as there will be no resources to extract strings from. It simply creates a new language folder named Base.lproj from which any language is then derived.

like image 198
Conor Avatar answered Oct 06 '22 19:10

Conor