我想制作一个json文件的模式.它是一组产品.
json架构类似如下:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Product set",
"type": "array",
"items": {
"title": "Product",
"type": "object",
"properties": {
"id": {
"description": "The unique identifier for a product",
"type": "number"
},
"name": {
"type": "string"
},
"price": {
"type": "number",
"minimum": 0,
"exclusiveMinimum": true
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"uniqueItems": true
},
"dimensions": {
"type": "object",
"properties": {
"length": {"type": "number"},
"width": {"type": "number"},
"height": {"type": "number"}
},
"required": ["length", "width", "height"]
},
"warehouseLocation": …Run Code Online (Sandbox Code Playgroud) 我错误地从项目的信息中删除了项目的本地化.故事板和相关语言都被删除了.
我从之前的文件中找回了故事板,但是当我想添加一个新的本地化时,弹出一个窗口并要求我" 选择文件和参考语言来创建英语本地化 ",并且根本没有资源文件.
如何添加本地化?
我尝试使用CFBundleDisplayName进行应用名称的本地化.
我根据两种不同的语言制作了本地化的InfoPlist.strings.
在一个字符串文件中写道:
CFBundleDisplayName ="x11111"和另一个:
CFBundleDisplayName ="y22222"
在文件info.plist中,我添加了"应用程序需要iPhone环境"属性,并将布尔值设置为YES.在info.plist中,"Bundle display name"我使用了"x11111".
本地化在模拟器上运行正常,但在设备上进行测试时,它无法正常工作.在设备上,我只能显示我在info.plist中用于"Bundle display name"的名称.
顺便说一句,我使用cocos2d作为项目.
我错过了什么或做错了什么?