Add new language to existing localization of Xcode project

I am working on an existing Xcode 3.2.2 Universal iPhone OS project, which is already localized for 4 languages ​​(EN, IT, DE and FR). Now we are adding a new language (JA) to this project.

Each existing folder .lproj( en.lproj, it.lproj, de.lprojand fr.lproj) has nearly 60 files, including PNG, HTML, and file Localizable.strings. Each of these files appears as localized groups within groups and files in Xcode. They spread throughout the tree.

If I right-click on one of these groups (for example Localizable.strings) inside Xcode, Get Info, click "Add Localization" and type " ja" - as Xcode docs suggest, nothing happens. From what I read in this new group , perhaps because of the name of these folders. If they were named like English.lprojand Italian.lproj, it should have worked.

So, to actually import a localized file of a new language into an existing group, I need:

  • Right-click the localized group file.
  • Select "Add Existing File."
  • Select the appropriate file inside the folder ja.lproj.

I am going to get a new folder ja.lprojwith these 60 localized files and would like to import them into the project so as not to include searching for each individual file in groups and trees and performing these steps ... for each of these 60 files.

Is it possible? Is there a proper (or better) way to import a new language into this Xcode project?

+3
source share
4 answers

. , | | ... | , . , , xCode , . , .

+5

:

  • ;
  • .lproj- ;
  • " ";
  • .
+1

: Xcode "English.lproj", "Italian.lproj" .. , Xcode , , . , , Xcode.

0

Xcode 7+ :

  • localizable.strings "...":

enter image description here

  1. , , localizable.strings , , "Base"

  2. Select the project in the navigation panel, select the project again, switch to "Information" and press the "+" button under the "Localization" heading:

enter image description here

  1. Now you need to select the langauge that you want to translate, and mark ONLY the Localizable.strings file:

enter image description here

  1. Now it will be added to the Localizble.strings file, and the actual line that will be shown to the user will correspond to its OS language (as long as you have NSLocalizedString throughout your application):

enter image description here

0
source

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


All Articles