我正在尝试找到一种本地化 google cast sample app 的方法. 当我查看文档时,我发现我们需要在创建 sharedInstance 时设置一些启动选项。所以在示例应用程序中,他的 appdelegate 我将 setSharedInstance 部分更改为:
let options = GCKCastOptions(discoveryCriteria: GCKDiscoveryCriteria(applicationID: kReceiverAppID))
options.physicalVolumeButtonsWillControlDeviceVolume = true
let launchOptions = GCKLaunchOptions(languageCode: "fr", relaunchIfRunning: false)
options.launchOptions = launchOptions
GCKCastContext.setSharedInstanceWith(options)
我还尝试了 fr-FR 和其他语言代码,还尝试将“relaunchIfRunning”设置为 true。但似乎这些都不起作用。
有人成功更改了 googlecast 屏幕的语言吗?
亲切的问候, 史蒂夫
最佳答案
您还必须本地化 Setting.bundle。这是使用文本编辑手动完成的:(
Settings.bundle:
Root.plist
en.lproj:
Root.strings
fr.lproj:
Root.strings
en.lproj, ru.lproj 文件夹
Root.strings - 文件
关于ios - googleCast 框架的本地化不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58970782/