Skin Expressions: Localized or empty string in iif-expression

Discussion in 'MediaPortal 1 Skins' started by bta489, June 22, 2016.

  1. bta489

    bta489 Portal Pro

    March 17, 2013
    Likes Received:
    +49 / 0
    Home Country:
    Germany Germany
    Show System Specs
    I'm trying to modify the Apollo-Skin. In the original skin some words are harcoded in plain english and I want to replace them with the localized version. But one inside an iif - Expression isn't cooperating. The line in question is something like this (I removed the working parts for clarity):
    Code (XML):
    1. <label>#(iif(eq(#TVSeries.Episode.AvailableSubtitles,'1'),' | #(L(293))',''))</label>
    This should, if subtitles are available, add the separator and the localized string "Subtitles" (string-ID 293). If no subtitles are available this string should be empty. But this only displays ' | #(L(293))'.

    I had some success to display the correct string by enclosing the entire iif-Expression with the translation-Expression. But then if the iif-statement returns false instead of an empty string an error message is displayed in the label.

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.


  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!