googleCast框架的本地化不起作用

问题描述 投票:0回答:2

我正在尝试找到一种将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屏幕的语言吗?

亲切的问候,Stef

ios swift iphone google-cast google-cast-sdk
2个回答
1
投票

您还必须本地化Setting.bundle。这是使用文本编辑:(

手动完成的
Settings.bundle:
    Root.plist
    en.lproj:
        Root.strings
    fr.lproj:
        Root.strings

en.lproj,ru.lproj文件夹

Root.strings-文件


0
投票

在您的项目文件中添加对我有用的语言。

© www.soinside.com 2019 - 2024. All rights reserved.