Copied to clipboard

Flag this post as spam?

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


  • vijay 129 posts 152 karma points
    Dec 29, 2009 @ 14:08
    vijay
    0

    How to create multiple language supported website in umbraco?

    Hi all,

    How to create multiple language supported website in umbraco?

    Thanks in Advance,

    ---vijay.

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Dec 29, 2009 @ 14:24
    Sebastiaan Janssen
    0

    Hi Vijay, before you post questions, it would help if you searched for an answer. There have been numerous discussions in the forum about this and there is no one-size-fits-all solution.

    That being said, have a look at this wiki page. If that doesn't suit your needs, search the forums and also google, there is a lot of posts for you to dig through.

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Dec 29, 2009 @ 14:24
    Chris Houston
    0

    Hi Vijay,

    Have a look at this Wiki page:

    http://our.umbraco.org/wiki/how-tos/running-multi-lingual-sites-under-a-single-domain

    Cheers,

    Chris

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Dec 29, 2009 @ 14:25
    Chris Houston
    0

    It seems Sebastiaan and I had the same idea :)

    Cheers,

    Chris

  • vijay 129 posts 152 karma points
    Dec 30, 2009 @ 08:57
    vijay
    0

    hi all,

    I m unable to understand what happening when i go through the post.

    There is no specific explanation about how to create Multi language sites using umbraco in forum / in web.

    I will follow the below to implement multilingual site but conversion is not happening

    Please tell me about xslt creation as they mentioned in this link

    http://umbraco.org/documentation/books/multilingual-11-sites/summary-of-the-multilingual-11-site-system

    ----vijay.

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Dec 31, 2009 @ 12:12
    Chris Houston
    0

    Hi Vijay,

    Please do not keep creating new posts related to the same topic, it makes it far more confusing for everyone as we don't know what you have already been told.

    Have you worked your way through the http://umbraco.org/documentation/books/multilingual-11-sites example?

    If so, where have you got stuck and what do you not understand?

    If you have not gone through this example that you say is what you are trying to achieve, then please do and then post any problems you have within this thread.

    Cheers,

    Chris

  • vijay 129 posts 152 karma points
    Dec 31, 2009 @ 13:44
    vijay
    0

    the points 3) to 6) i cant understand.

    -----vijay

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Dec 31, 2009 @ 15:37
    Nik Wahlberg
    0

    Hi Vijay, could you be a tad more specific on what is unclear to you? The instructions in this book are very detailed, so it would be helpful to know what specifically you need further clarification on. 

    Thanks,
    Nik

  • vijay 129 posts 152 karma points
    Jan 02, 2010 @ 05:57
    vijay
    0

    Hi Nik,

    Thanks for your reply.

    Below i mentioned those points where i stuck.

    In point mentioned below they said to add  lang_lib.xslt reference to your xslt.

    How to write our own xslt here. Can u give some idea what it consists of.

     4) Alter all field references

    Now we need to alter the XSLT files to look for the correct field from the displayed document.

    First make sure to include the lang_lib.xslt (from step 3) in the beginning of all XSLT files that need translations. You should add it between the Stylesheet element and the first template element.

        <xsl:include href="../xslt/lang_lib.xslt" />

    You need to substitute each reference to a field with the X-path concat function, adding the languagecode defined in lang_lib.xslt. Example: Say, the alias name of a field is: “ALIASNAME”, we might have this code:

        <xsl:value-of select="$currentPage/data[@alias = 'ALIASNAME']" />

    - we need to change it to this:

        <xsl:value-of select="$currentPage/data[@alias = concat('ALIASNAME',$flang)]" />

    6) Replace “hardcoded” text with dictionary calls.

    Now, we can add this extension in all XSLT files where we need dictionary translations.

    What it means to all XSLT files in our code. Can u send any sample xslt file work with this code.

    First we need to add the namespace declaration in the stylesheet element:

    <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:kv_trans ="urn:kv_trans"
        exclude-result-prefixes="msxml umbraco.library kv_trans">
    ...  

    (The added code is highlighted.)

    Then we can use it this way anywhere in our XSLT file:

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

    Where the ‘KEY’ is the dictionary key for the entry, as explained in step 5.

    Again, change the namespace and aliasname to what you used above, in step 5.

    Thanks in advance,

    ---vijay.

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Jan 02, 2010 @ 12:19
    Sebastiaan Janssen
    0

    Quote: "You should add it between the Stylesheet element and the first template element."

    So something like this, see the lang_lib.xslt is right after the <xsl:stylesheet> element:

    <?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">
    
    <xsl:include href="../xslt/lang_lib.xslt" />
    
    <xsl:output method="xml" omit-xml-declaration="yes"/>
    
    <xsl:param name="currentPage"/>
    
    <xsl:template match="/">
    
    <!-- start writing XSLT -->
    
    </xsl:template>
    
    </xsl:stylesheet>

  • vijay 129 posts 152 karma points
    Jan 02, 2010 @ 12:50
    vijay
    0

    Hi sebastian,

    Thanks for your reply. I m getting things now.

    --vijay.

  • vijay 129 posts 152 karma points
    Jan 02, 2010 @ 14:07
    vijay
    0

    Hello sebastian when i include lana_lib.xslt by above way and select xslt and click on visialize XSLT tool i m getting following error

    please see the highlighted path it is not taking the xslt file from actual folder and my actual folder is D:\DATA\Projects\Umbraco 4.0.2.1\xslt

    please guide me.

    ---------vijay.

    Error parsing the XSLT:

    System.Xml.Xsl.XslLoadException: XSLT compile error. An error occurred at (10,1). ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\WINDOWS\xslt\lang_lib.xslt'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials) at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) at System.Xml.Xsl.Xslt.XsltLoader.CreateReader(Uri uri, XmlResolver xmlResolver) at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(Uri uri, Boolean include) at System.Xml.Xsl.Xslt.XsltLoader.LoadInclude() at System.Xml.Xsl.Xslt.XsltLoader.LoadRealStylesheet() at System.Xml.Xsl.Xslt.XsltLoader.LoadDocument() at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include) --- End of inner exception stack trace --- at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include) at System.Xml.Xsl.Xslt.XsltLoader.Load(Compiler compiler, Object stylesheet, XmlResolver xmlResolver) at System.Xml.Xsl.Xslt.Compiler.Compile(Object stylesheet, XmlResolver xmlResolver, QilExpression& qil) at System.Xml.Xsl.XslCompiledTransform.CompileToQil(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) at System.Xml.Xsl.XslCompiledTransform.Load(XmlReader stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) at umbraco.macro.CreateXsltTransform(XmlTextReader

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Jan 02, 2010 @ 14:10
    Sebastiaan Janssen
    0

    Oh, that's annoying, what happens if you remove the "../xslt/" part, like this:

    <xsl:include href="lang_lib.xslt" />
  • vijay 129 posts 152 karma points
    Jan 04, 2010 @ 05:40
    vijay
    0

    Hello Sebastiaan,

    if i give like above it is give error like i mentioned above path is  C:\WINDOWS\system32\lang_lib.xslt'.

    please see the highlighted path it is not taking the xslt file from actual folder and my actual folder is D:\DATA\Projects\Umbraco 4.0.2.1\xslt.

    -----vijay

  • Chau 66 posts 97 karma points
    Feb 01, 2010 @ 05:23
    Chau
    0

    I'm having this same problem. Whenever I use a xsl import or include it references direct from my local system rather than from the hosted website. Anyone know how to fix this?

    <xsl:include href="../xslt/lang_lib.xslt" />

    This is the line that I am using and I have tried modifying it every way possible to get it to work. Thanks.

  • Petr Snobelt 923 posts 1535 karma points
    Feb 01, 2010 @ 08:44
  • Chau 66 posts 97 karma points
    Feb 01, 2010 @ 17:28
    Chau
    0

    @Petr - Thanks but I have already gone through that article to no avail. It doesn't seem to want to look for the xslt in the website directories but the directories of my local drives. Still not sure what is going on.

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Feb 01, 2010 @ 17:56
    Peter Dijksterhuis
    0

    Do you have C# script in one of your xslt-files by any chance? If so, remove that and see if it works then.

    Peter

  • Chau 66 posts 97 karma points
    Feb 01, 2010 @ 20:31
    Chau
    0

    @Peter - I've done relatively little xslt programming but I have installed some packages. What exactly would the C# script look like. Thanks.

  • Adrian Alexa 50 posts 100 karma points
    Jan 12, 2012 @ 15:17
    Adrian Alexa
    0

    i am stucked in step 3 and 4.

    <xsl:template match="/">
        <xsl:call-template name="setlang" />
        ...
    </xsl:template>

     

    where do I have to write that? in which files? in my root are 2 more xslt files. The problem is that I don't know if they are used somewhere in project. As I have changed content or commented entire code from them they don't change content of the site.

     

    in step 4

       <xsl:value-of select="$currentPage/data[@alias = 'ALIASNAME']" />

    - we need to change it to this:

        <xsl:value-of select="$currentPage/data[@alias = concat('ALIASNAME',$flang)]" />

    i do not have anywhere that piece of line :|

    Please see this post too, so you can see some print screens. http://our.umbraco.org/forum/using/ui-questions/27495-Which-is-the-ideal-way-to-create-multilanguage-site

     

Please Sign in or register to post replies

Write your reply to:

Draft