Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
monkeysource
Visitor

Localised images not loading

Hi,

I'm trying to localise some images, but they are not being found within the locale folder. 

My folder structure is as follows:

locale
   default
        images/try.png
   en_GB
        images/try.png

And my XML is


<Poster
                id="tryPoster"
                uri="pkg:/locale/images/try.png"
                translation="[227.0,104.0]" />  


But the image will no load, unless I give it an exact URI to a specific localised directory. I've confirmed my locale is "en_GB" from GetCurrentLocale() function on the device. 


Thanks,

Ryan
0 Kudos
8 REPLIES 8
squirreltown
Roku Guru

Re: Localised images not loading

     uri="pkg:/locale/images/try.png"

This should be    uri="pkg:/locale/en_GB/images/try.png" if you are going direct.
 Sorry i can't address any SG differences to the translation system, but this is B/S for getting an image.
m.localization = CreateObject("rolocalization")
flyloco = m.localization.GetLocalizedAsset("images", "flyco.png")
Kinetics Screensavers
0 Kudos
monkeysource
Visitor

Re: Localised images not loading

Thanks for the reply. Yes, going direct with the uri suggested does work, I've tried this to simply prove the images were packaged and deployed correctly.

But I don't want to go direct. I want to use the SG localisation system, which is documented as my uri in the first post. The docs suggest this uri is recognised and will be translated correctly to the appropriate localised asset.

Thanks,

Ryan
0 Kudos
squirreltown
Roku Guru

Re: Localised images not loading

I  found that page confusing. What you say is correct, however right below that is this:

For example, if you want to have a localized version of a graphical image for Canadian French, and a default image for all other languages, place two versions of the image in the 
pkg:/locale


directory as follows:[/font]

pkg:/locale/fr_CA/images/image_name_canadian_french 
pkg:/locale/default/images/image_name_default


I would try this, as it's the way it works in B/S. 
Kinetics Screensavers
0 Kudos
EnTerr
Roku Guru

Re: Localised images not loading

"monkeysource" wrote:
I want to use the SG localisation system, which is documented as my uri in the first post. The docs suggest this uri is recognised and will be translated correctly to the appropriate localised asset.

Seems you are doing it right and there is a bug, yes.
0 Kudos
TheEndless
Channel Surfer

Re: Localised images not loading

I'm pretty sure you need to set the URI in your Brightscript code.  I don't think localization is automatically supported in the SceneGraph XML.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
monkeysource
Visitor

Re: Localised images not loading

The docs say it is supported, so I guess this must be a bug as EnTerr says. See here for more:

https://sdkdocs.roku.com/display/sdkdoc ... ionPackage

I'm finding a few bugs, and it would be good to get the docs updated to reflect them to save others wasting time. 

Does anyone know if there is a formal bug report process?

Thanks,

Ryan
0 Kudos
TheEndless
Channel Surfer

Re: Localised images not loading

"monkeysource" wrote:
The docs say it is supported

You're absolutely correct.  Sorry.. I missed that..  :oops:
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
EnTerr
Roku Guru

Re: Localised images not loading

"monkeysource" wrote:
I'm finding a few bugs, and it would be good to get the docs updated to reflect them to save others wasting time. 
Does anyone know if there is a formal bug report process?

Email developer at roku.com and pray that one of the Co's "hermit evangelists" (an oxymoron if ever there was one) will hit "Reply".

Also report in this forum - or rather start from here (as you did) - since sometimes things one suspects are bugs have undocumented-but-community-known reason being "features".

PS. if you are finding only "a few" bugs, you are not looking hard enough  Smiley LOL 
PPS. Fingers crossed that the RSG URI localization was never implemented in the first place - i just posted </humble>a much better<humble> proposal at viewtopic.php?f=34&t=96446 😛
0 Kudos