Copied to clipboard

Flag this post as spam?

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


  • tvn 2 posts 22 karma points
    Oct 19, 2010 @ 14:59
    tvn
    0

    Documentation on multilanguage sites missing

    Hello.

    I am building multilanguage site with Umbraco right now and cant seem to find documentation for 1-1 multilanguage sites which used to be accessable via this link: http://umbraco.org/documentation/books/multilingual-11-sites/summary-of-the-multilingual-11-site-system

    Is there any other place where I can find it?

    There is literally no other info on this subject anywhere, all posts I managed to find refer to that one link i posted above.

    Thank you for help!

     

     

  • tvn 2 posts 22 karma points
    Nov 02, 2010 @ 17:25
  • Ernst Utvik 123 posts 235 karma points
    Jan 05, 2011 @ 13:19
    Ernst Utvik
    0

    Thanks for pointing me to that. I successfully did some tests using this guide some months ago, but never got around to testing the dictionary bit.

    Doing it now i get a System.NullReferenceException when trying to save the xslt.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:xsltmembers="urn:xsltmembers" xmlns:kv_trans="urn:kv_trans"
      exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets xsltmembers kv_trans ">


    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>
        <xsl:include href="../xslt/ELSP_lang_lib.xslt" />
        <xsl:variable name="mainNode" select="$currentPage/ancestor-or-self::* [@id = '1542']"/>

    <xsl:template match="/">
    <div id="nav">
    <ul>
      <li><a href="{umbraco.library:NiceUrl(1542)}">
        <xsl:value-of select="kv_trans:translate('Home',string($dlang))" />
      </a></li>
      <xsl:for-each select="$mainNode/* [@isDoc and umbracoNaviHide = '0']">
        <li><a href="{umbraco.library:NiceUrl(@id)}">
            <xsl:choose>
              <xsl:when test="*[name() = concat('basicHeader', $flang)] != ''">
                <xsl:value-of select="*[name() = concat('basicHeader', $flang)]" />
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="basicHeader"/>
              </xsl:otherwise>
            </xsl:choose>
          </a></li>
      </xsl:for-each>
    </ul>
    </div>
    </xsl:template>

    </xsl:stylesheet>

    its the

    <xsl:value-of select="kv_trans:translate('Home',string($dlang))" />

    that is giving me problems, but I cant seem to figure it out. Did you get this part working on your site?

  • Ernst Utvik 123 posts 235 karma points
    Jan 05, 2011 @ 14:02
    Ernst Utvik
    0

    After doing some testing I found the solution for this one. Posting here for future reference:

    The culturecodes used in the tutorial has changed (probably with umbraco 4) Where it used to be "en" for english, you now have to use "en-GB" for English - United Kingdom and so on. "no" is now "nb-NO" for Norwegian (Bokmål) - Norway. Full list can be found here.

    The error wasn't in the xslt posted above, but in the xslt extension. It checks if the language length is 2, so the updated code should say:

    if (language.Length != 5) language = "nb-NO"; // hardcoded default language. Reimplement as desired.

    You also have to change the doc-type properties accordingly: "basicHeader_en" is now "basicHeader_en-GB"

  • Anders Haahr 26 posts 31 karma points
    May 21, 2011 @ 10:16
    Anders Haahr
    0

    I was looking for that documentation too.

    Great such things as the wayback machine exists when the core team of some open source project seems to speculate in hiding away documentation until one pays for a subscription.

    .

Please Sign in or register to post replies

Write your reply to:

Draft