Xcode Base 国际化不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15986313/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode Base internationalization doesn't work
提问by Sparviero
I'm trying to localize my app. I noticed that if I add a language every localized file become doubled. In this way it's impossible to maintain code or storyboard so I learnt that I need Base internationalization.
我正在尝试本地化我的应用程序。我注意到如果我添加一种语言,每个本地化文件都会加倍。这样就不可能维护代码或故事板,所以我知道我需要Base 国际化。
The problem is that when I select that checkbox in xcode project setting it shows a window without nothing to select, does anyone know how to fix this?
问题是,当我在 xcode 项目设置中选择该复选框时,它会显示一个没有任何选择的窗口,有谁知道如何解决这个问题?
Here's a screenshot
这是屏幕截图
回答by charleyh
First, you need to go to your storyboard file, open the bar on the right side, and go to Show the File Inspector, the furthest tab to the left. Then, scroll down and click localize. After this, when you check Use Base Localization, you should see the storyboard appear.
首先,您需要转到故事板文件,打开右侧的栏,然后转到左侧最远的选项卡显示文件检查器。然后,向下滚动并单击本地化。在此之后,当您选中 Use Base Localization 时,您应该会看到故事板出现。
回答by hasan
This could happen if Base Internationalization was active before then disabled and files deleted manually.
如果 Base Internationalization 在禁用之前处于活动状态并手动删除文件,则可能会发生这种情况。
- Create Base.lproj folder in your project folder using the finder.
- Move your main story board to it also using the finder.
- fix the reference to it from Xcode.
- remove app. from device, clean & build your project.
- 使用查找器在您的项目文件夹中创建 Base.lproj 文件夹。
- 也使用查找器将您的主故事板移到它。
- 从 Xcode 修复对它的引用。
- 删除应用程序。从设备,清理并构建您的项目。
All will be back to normal.
一切都会恢复正常。