Xcode: Show all localized files for one language (IOS project)

I kept looking for Xcode and Google, but I just can't figure out how to do this:

I use basic localization and it shows 4 files localized for English. I have no idea why this is 4, and I would like to know why. But how? How can I get a list of all localized files (and where are these files)?

Is it such an unusual task that I cannot find an answer? Or is it obvious and I just can't find it?

I realized that when I try to add another language (for example, Japanase), I will see that there are 4x InfoPlist.strings files for English and 1x files for basic localization (Storyboard), but I still do not know why and where are these files and how to delete them.

By checking the en.lproj folder, there is only 1 InfoPlist.strings file. Why does Xcode tell me I have 4 of them?

+6
source share
6 answers

There is a way to delete localized files. If you use version control, you can make sure that your work is fixed and your tree is clean. Then, when you delete localized files, you can simply check the state of your tree and see what files they were , and restore them to find out what you need to do from there.

I agree that this is a pretty terrible developer experience. Just add it to the list of ways to abuse mobile developers.

enter image description here

+5
source

use this answer manual language selection in iOS application (iPhone and iPad)

You can set whatever language you want, remember "Localizable.strings" for the content of the text text

+1
source

Xcode outputs this information from your project file. Therefore, if you can’t get it out by looking at your lproj folder, you can open the pbxproj file (under your .xcodeproj folder) and find the locale there.

+1
source

You can check your files by selecting them in Project Navigator, and then look at the File Inspector to the right of Xcode.

Here, if your file is localized, you can see which languages ​​are present and select / deselect.

enter image description here

You can also use Finder: go to the project folder, there are folders called ja.lproj or it.lproj (the actual name changes according to the version of Xcode). In these folders you will find all the files that are localized for this language (for example, in ja.lproj you will see the al file, localized in Japanese).

0
source

The easiest way is to open the een search screen at the root of your project. After that, enter en.lproj (or your main language) in the search bar.

Select only search in folder

Now you have a list with all localized files.

Search for localized files in xCode project

0
source

I was also interested. I did not start the localization process, and Xcode already told me that I have "2 files localized."

You might want to check goals in your project. I had one InfoPlist.strings file for my main target and a second InfoPlist.strings file for my unit test target.

If you try to add a new localization, a confirmation screen will appear with a list of all resource files and a drop-down list for each reference language associated with these resource files.

Resource File! = Localized File.

Reference Language = localized file.

For each language that you see in the "Help Language" drop-down list, the "Localized Files" counter is incremented by one.

In my case, on this confirmation screen, two identical entries were shown corresponding to the InfoPlit.strings resource files for each target, and English is the only language referenced for each, which makes it "2 files are localized."

The funny thing about all this is that "Resource Files" technically do not exist in the file system, only localized files are made in these .lproj folders.

“Resource files,” as far as I can tell, are pointless Xcode.

0
source

Source: https://habr.com/ru/post/954754/


All Articles