Steaphann
Steaphann

Reputation: 2777

Localization of the googleCast framework not working

I'm trying to find a way to localize the google cast sample app. When I look at the documentation I see that we need to set some launch options when we create the sharedInstance. So in the sample app his appdelegate I changed the setSharedInstance part to this:

let options = GCKCastOptions(discoveryCriteria: GCKDiscoveryCriteria(applicationID: kReceiverAppID))
options.physicalVolumeButtonsWillControlDeviceVolume = true
let launchOptions = GCKLaunchOptions(languageCode: "fr", relaunchIfRunning: false)
options.launchOptions = launchOptions
GCKCastContext.setSharedInstanceWith(options)

I also tried fr-FR and other language codes and also tried to set 'relaunchIfRunning' to true. But It seems that none of that is working.

Anybody succeeded in changing the language of the googlecast screens?

Kind regards, Stef

Upvotes: 3

Views: 351

Answers (2)

Jawad Ali
Jawad Ali

Reputation: 14417

Add the language in your project file, that worked for me.

Upvotes: 0

Q.u.a.n.g L.
Q.u.a.n.g L.

Reputation: 1614

You must localize the Setting.bundle as well. And this is done manually using text edit :(

Settings.bundle:
    Root.plist
    en.lproj:
        Root.strings
    fr.lproj:
        Root.strings

en.lproj, ru.lproj folders

Root.strings - file

Upvotes: 3

Related Questions