Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fuji Kusaka 2203 posts 4220 karma points
    Jun 06, 2012 @ 13:28
    Fuji Kusaka
    0

    Culture Info

    Hi Guys,

    I have a multilingual website where i need to check the culture info to display a piece of text. I somehow cant use dictionary items here since the translation is somehow very different.

    For example if language is set to EN i will display  @pageName "highlights" and if FR "Prestations" and value of @pageName.

    Any suggestions most welcome on how to proceed?

    //fuji

  • Peter Duncanson 430 posts 1358 karma points c-trib
    Jun 06, 2012 @ 16:05
    Peter Duncanson
    3

    Take a look at ucomponents CMS XSLT Extension. It has a load of Language methods in there. GetLanguageIdByNodeId might be of use to you?

    http://ucomponents.codeplex.com/wikipage?title=CMS&referringTitle=Documentation

    Pete

  • Fuji Kusaka 2203 posts 4220 karma points
    Jun 06, 2012 @ 22:05
    Fuji Kusaka
    0

    Hi Peter,

    Thanks for the reply. As a fast solution to fix my problem i instead make a test so as to display a certain text for all the ancestors of the Domain by using the id.

    Not best solution, but with a 2 language website it does the job quiet well specially when having to display dictionary items in a different order.

     

      <xsl:choose>
                  <xsl:when test="$currentPage/ancestor-or-self::* [@id=1046]">
                      <div class="highlights">
                  <strong> <xsl:value-of select="@nodeName"/>&nbsp;<xsl:value-of select="umbraco.library:GetDictionaryItem('Highlights')"/></strong>                  <xsl:value-of select="$highlights" />
                  </div>
    </xsl:when>
                  <xsl:when test="$currentPage/ancestor-or-self::* [@id=1544]">
                      <div class="highlights">
                  <strong><xsl:value-of select="umbraco.library:GetDictionaryItem('Highlights')"/>&nbsp;<xsl:value-of select="@nodeName"/></strong><xsl:value-of select="$highlights"/>
                  </div>
    </xsl:when>
                  <xsl:otherwise>
    </xsl:otherwise>
    </xsl:choose>

    But eventually will need to give uComponents a go.

    //fuji

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies