Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove localization from file

I'm trying to unlocalize xib and storyboard files, and keep all strings in Localizable.strings. How do I do this in XCode?

I've tried to uncheck all languages in the File Inspector, but if I remove the last language the whole file disappears.

enter image description here

A file that is not localized looks like this:

enter image description here

Unlocalized files wont appear when you add a new language or when you export localizations with xliff.

like image 752
Toydor Avatar asked Oct 27 '16 13:10

Toydor


People also ask

How do I remove localization?

strings" and open the File Inspector (keyboard shortcut cmd-opt-1 or View > Utilities > Show File Inspector in the menu bar). You'll see a Localization pane with your localizations listed. Select the one you want to remove and click the minus sign to delete it.

How do I get rid of localization on Iphone?

Here's how: Go to Settings > Privacy, then select Location Services. Select an app, then turn Precise Location on or off.

What is the localization file?

In software localization projects, translatable strings are first collected in so-called “localization files” or “resource files.” These files are then handed off to translators who translate strings and thereby create copies of the original files now containing equivalent strings in a different language.

What are macOS localizations?

Localization is the process of translating text and audio content for use across multiple languages. Software programs, including the macOS operating system, use a variety of localization schemes to show content to users in their preferred language.


2 Answers

This is a pretty stupid way, but the only one I found out working if you want to restore the default:

  1. Move the xib or Storyboard files from the Base.lprojfolder to your main project folder back (within the Finder).
  2. Delete the reference of the XIB/Storyboard files (in XCode)
  3. Reimport all of them back to your XCode project and you are done
like image 159
zero3nna Avatar answered Sep 22 '22 15:09

zero3nna


In Xcode create a Localizable.strings file. In Xcode select the file and on the right panel, checkbox the languages you want for it. Then copy/pasta the files/strings into the place you want them. Then remove the old languages for the xib/storyboard.

enter image description here

like image 27
StackUnderflow Avatar answered Sep 25 '22 15:09

StackUnderflow