
monkeysource
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016
09:34 AM
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
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
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
8 REPLIES 8

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016
10:37 AM
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

monkeysource
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016
12:38 PM
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
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

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016
12:51 PM
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
directory as follows:[/font]
I would try this, as it's the way it works in B/S.
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
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2016
11:53 PM
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.

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2016
12:11 AM
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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)

monkeysource
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2016
01:16 AM
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
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

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2016
07:14 AM
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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2016
01:32 PM
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

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 😛