0

Picture for other langs and resolutions

I´ve added a picture to my snippet:
CODE
var SnippetView = new KONtx.Class({
ClassName: 'SnippetView',

Extends: KONtx.system.SnippetView,

createView: function () {
this.log('[LA.yandex.probki] createView');

this.controls.anchor_image = new KONtx.element.Image({
src: 'Resources/en/snippet-main-540.png',
styles: {
hOffset: 1,
vOffset: 8
}
}).appendTo(this);

What do I need to change in this code to display different picture for different resolutions (540 and 1080) and different languages?

by
4 Replies
  • For the present time you can focus on the 540 resolution (support for 1080 requires a separate submission):

    http://developer.yahoo.com/connectedtv/dev...each_Resolution

    To change an image in an existing view call
    CODE
    myImage.setSource(newURL);


    Thank you,
    Kelly
    0
  • thanks for your reply.
    So, I need to identify locale in the code itself and then display according picture, right?
    QUOTE
    if ( locale.substr( 0, 2 ) == "en" ) {
    myImage.src = 'Images/eng.jpg'
    }


    But it is about localization of the data from widget.xml? Like .logo file? Widget name etc.?
    0
  • QUOTE
    But it is about localization of the data from widget.xml? Like .logo file? Widget name etc.?

    sorry, what is about localization of the data from widget.xml? Like .logo file? Widget name etc.?
    0
  • ok. seems I can do something like:
    CODE
    widget.name = "bla-bla";

    in the code, but it doesn't have effect on all fields (for ex., on sidebar title, when logo image is not defined)...
    0

Recent Posts

in Getting Started / Beginners - Yahoo! TV Widgets