Localization of the iPhone Settings.bundle

前端 未结 6 963
半阙折子戏
半阙折子戏 2021-02-18 21:12

For some reason I cannot get the Settings.bundle to recognize my additional languages. I must be missing something obvious, but I just cannot figure it out. Here\'s what I\'ve

6条回答
  •  广开言路
    2021-02-18 21:25

    In Xcode 5 there is still no obvious way to localize the Settings.bundle.

    The problem

    Xcode doesn't allow you to localize a file that is only shown because it is a file inside a folder that's directly shown in Xcode (hence the blue folder icons in the tree).

    The Solution:

    1. right-click the Root.strings file and select "Show in Finder"
    2. List item
    3. move the Root.strings file one folder up, so that the en.lproj folder is empty and the Cmd-Drag the Root.strings file is next to the Root.plist.
    4. delete the now empty en.lproj
    5. go back to Xcode, notice that the tree will reflect the changes you now made
    6. cmd-drag the file in the tree outside to outside the settings-bundle, so that it appears next to your source-code.
      • Do not copy the file
    7. a dialog will appear asking you what to do with the file.
      • DO NOT select the checkbox to copy the file (you need this to be a reference)
      • DO NOT select a target to include the strings-file (the settings.bundle is already assigned to the correct target)
    8. in the file inspector you can now choose to localize the file and to add languages to the localizations. The files will be placed correctly inside the settings.bundle and the tree will automatically reflect these changes, too.

提交回复
热议问题