我在文件夹中仅使用一种语言为我的应用程序创建了帮助,并且它有效。我尝试过本地化此内容并添加西班牙语翻译,但失败了。
我对Apples Guide 创建帮助手册的理解是,我需要创建一个 .help 包才能使本地化工作。我已经这样做了,但收到一条错误消息“所选主题当前不可用。”。有几次我认为它可以工作,但它只是显示我拥有的预本地化内容。清空帮助查看器缓存似乎可以阻止这种情况,但随后我又返回获取不可用内容错误消息。
在我的应用程序的 AppName-Info.plist 文件中,我有以下帮助相关条目:
<key>CFBundleHelpBookFolder</key>
<string>AppName.help</string>
<key>CFBundleHelpBookName</key>
<string>garsonix.appname.help</string>
Run Code Online (Sandbox Code Playgroud)
我的 AppName.help 文件具有以下结构:
AppName.help
Contents
Info.plist
Resources
English.lproj
index.html
search.helpindex
Spanish.lproj
index.html
search.helpindex
shrd
logo.png
Run Code Online (Sandbox Code Playgroud)
AppName.help 中的 Info.plist 文件具有以下键:
<key>CFBundleDevelopmentRegion</key>
<string>en_GB</string>
<key>CFBundleIdentifier</key>
<string>garsonix.appname.help</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>AppName</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.13</string>
<key>CFBundleSignature</key>
<string>hbwr</string>
<key>CFBundleVersion</key>
<string>1.13</string>
<key>HPDBookAccessPath</key>
<string>index.html</string>
<key>HPDBookIconPath</key>
<string>shrd/logo.png</string>
<key>HPDBookKBProduct</key>
<string>GAppName</string>
<key>HPDBookKBURL</key>
<string>http://www.garsonix.co.uk/</string>
<key>HPDBookRemoteURL</key>
<string>http://www.garsonix.co.uk/</string>
<key>HPDBookTitle</key>
<string>AppName Help</string>
<key>HPDBookType</key>
<string>3</string>
<key>HPDBookIndexPath</key>
<string>search.helpindex</string>
Run Code Online (Sandbox Code Playgroud)
有谁知道我做错了什么,或者知道制作 .help 文件的好教程?
我终于成功了,但我不得不放弃 .help 文件格式。
相反,我保留了旧的简单帮助文件夹,为每种语言复制了该文件夹。然后,每个帮助文件夹与本地化 nib 文件一起放入主应用程序包的现有本地化文件夹中。
我发现本文中的说明非常有用: https://web.archive.org/web/20150421040211/https ://www.icalamus.net/ioda/howto_applehelpbook.php?lan=en
我仍然想知道如何使 .help 格式正常工作,但这已经解决了我的问题并且看起来更简单。唯一的小缺点是无法共享资源,例如不需要本地化的图像。
| 归档时间: |
|
| 查看次数: |
1953 次 |
| 最近记录: |