I'm trying to remove a localization from a String Catalog in a Swift Package. How can I do that?
I tried to remove the file and create a new one, but all the languages are back. The only place where I've found a reference to the languages is in Package/.swiftpm/xcode/package.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate
But I don't know how to edit this file to remove a language.
Remove the hidden folder .swiftpm from the Package folder. I noticed the UserInterfaceState.xcuserstate file in a subfolder of this folder contained some references to the languages (I could find language codes in it like "pt-PT").
Open the package again with Xcode.
The languages that weren't translated at all (0% progress) got removed from the string catalog. The other languages where at least one string was translated stayed in the string catalog.
I don't think this is ideal but I hope it can help others.