Haroldo Gondim
Haroldo Gondim

Reputation: 7993

How to remove unused languages from Localizable.xcstrings

I created the file and added a language that I don't want to translate in my app, how can I delete the language and keep only the others that I want?

unused

In the image, for example, I wanted to keep only English and Portuguese, and delete Danish and Swedish.

PS1: I cannot remove by pressing delete on keyboard

PS2: There are no references to the language in source of the file, only the default language (English) and the translation in this case (Portuguese)

source

How the delete the unused languages?

Upvotes: 4

Views: 1427

Answers (2)

s1249
s1249

Reputation: 39

Had the same problem- did a grep with the language code in the root of the git workspace and got a match in the UserInterfaceState.xcuserstate file. Deleted this (it'll get automatically re-created) and the language was removed. I made sure to quit Xcode while deleting the file.

This file is in the ProjectName.xcodeproj/project.xcworkspace/xcuserdata/{user}.xcuserdatad directory. Since most people have xcuserdata in gitignore, that explains why it doesn't show up as modified.

Upvotes: 3

Nike Kov
Nike Kov

Reputation: 13734

It depends on Known Regions in your project settings. You should remove there.

enter image description here

Upvotes: 3

Related Questions