Search code examples
iosxcodelocalizationlocalizable.strings

Is it possible to remove a UILabel from localization?


Hello localisation pros,

after searching the various tutorials, tipps and tricks around "Localization" and of course this stackoverflow forum, I have to commit, that I did not find a good answer. Thats why I post my problem here and hope for an answer.

I have two types of UILabel in my Storyboard. And I have plenty of each type in the app.

  • One type contains text, that is not necessary to localize, because it is just an integer (e.g. "5"), or an emoji or it is just an international word (e.g. "Computer").
  • And of course I have the other type of UILabel in my app, that contain text, that must be localized.

When exporting for localization, ALL UILabel in the Storyboard will be put in the localization files by xCode and makes the file bigger than necessary, since plenty of the UILabels belong to type 1.

Is there any way, to take out these UILabels from the localization process and to mark them as "not necessary to localize" ??

Thanks for helping.


Solution

  • You need to manually remove the each label entry from localize file as Xcode localize whole storyboard not single one or you can create xib of each viewController the you can localize each viewController . Thanks