Copied to clipboard

Flag this post as spam?

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


  • Wachter Bernd 48 posts 68 karma points
    Oct 21, 2009 @ 17:31
    Wachter Bernd
    0

    Multilanguage Sites with no Subdomain

    Hello,

    I have a Umbraco Site and will make the Site in 2 Languages.
    German as the Standard an English Version.
    On the Top of my Page i will make 2 Language Images for select the Language..

    My Default Language is always German and when the User click to the English Version
    Link Image at the top then must the Site change to the English Version....

    I will make this without Subdomains !!
    I will make this like in this Homepage where i have found in the Umbraco Refernces

    http://www.cerillion.com

     

    I will does the URL like this

    http://www.mydomain.at (as Standard)

    http://www.mydomain.at/de (German Version)
    http://www.mydomain.at/en (English Version)

     

    Can everyone Help me Please to make this without Subdomain like this i see in the Site
    http://www.cerillion.com

     

    Thanks

     

     

     

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Oct 21, 2009 @ 17:41
    Richard Soeteman
    1

    Hi,

    I had the same issue a while back. The solution is simple. Assign bogus domainnames to the /de and /en nodes (example cerrilionDE for de and cerillionEN for the english version).

    Umbraco has two ways to search for the language one is to find a match on the domain namen and if that lookup fails it will recurisve loop through the site until it finds a parent node where a language is assigned to and use that one.

    Hope it helps you,

    Richard

     

  • Wachter Bernd 48 posts 68 karma points
    Oct 21, 2009 @ 18:01
    Wachter Bernd
    0

    Hi Richard,

    Sorry i understand this not so....

    In my Umbraco Content Section i must make the following Structur (Folders) ?

    Content
      - mydomainameDE
      - mydomainnameEN

    In the Folder mydomain are my German Sites and in the
    mydomainEN Folder are the English Sites

    Is this correct ??

    Can you Describe my the Approach a little bit more please
    wat must i do ?

    Thanks

     

     

  • Rasmus Berntsen 215 posts 253 karma points c-trib
    Oct 21, 2009 @ 22:55
    Rasmus Berntsen
    0

    If I understand you correctly, then all you need to do is to have the following structure:

    Content

    -de

    --1 page

    --another page

    -en

    --1 page

    --another page

     

    And then set "HideTopLevelNodeFromPath" to false in your web.config. I've created a site without subdomains that way... :)

  • Wachter Bernd 48 posts 68 karma points
    Oct 22, 2009 @ 06:50
    Wachter Bernd
    0

    Hi,

    I must have 2 Languages in my Page German and English

    I will make this does lok like this on the Umbraco Site where i found

    http://www.cerillion.com

     

    my URL must be

    http://www.mydomain.at (as Standard)

    http://www.mydomain.at/de (German Version)
    http://www.mydomain.at/en (English Version)

     

    I will make this wit no Subdomain !!
    On the Top of my Page i have 2 Language Flags for German and English
    and when i click on the German Flag must be show the German Homepage
    and when i click the English Flag it must be show the English Website
    and the URL must show mydomain.at/de mydomain.at/en

    and on each Page i must can change the Language with a click on the Language Flag

    I hope you unsderstand me now ??

     

     

     

     

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Oct 22, 2009 @ 08:25
    Richard Soeteman
    0

    Hi,

    This was not what I meant. On the http://www.mydomain.at/de  node right click --> assign domain. You can enter mydomainameDE as the domain name and select the German Language.

    On the www.mydomain.at/en  node Right click --Assign domain you can enter mydomainameDE as the domain name and select the EnglishLanguage.

    I forgot to mention the HideTopLevelNodeFromPath that you need to set indeed.

    I've used this mechanism on a dutch site http://www.controlpartners.nl/ 

    Hereby the full xslt to list the languages. replace enteryourimagenamehere.gif with the name of your language images

    Cheers,

    Richard

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


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

    <xsl:param name="currentPage"/>

    <xsl:template match="/">
        <div class="flagdiv">
        <xsl:for-each select="$currentPage/ancestor::root/node">
            <a href="{umbraco.library:NiceUrl(@id)}" title="{@nodeName}">
                <img src="enteryourimagenamehere.gif" height="13" width="18" alt="{@nodeName}" />
            </a>&nbsp;
        </xsl:for-each>
        </div>
    </xsl:template>

    </xsl:stylesheet> 

  • Wachter Bernd 48 posts 68 karma points
    Oct 22, 2009 @ 09:18
    Wachter Bernd
    0

    Hi Richard,

    Is this correct so when i make my Node Names like this ?

    Content
      - de (This is my German Homepage)
        - Page1
        - Page2
      - en (This is my English Homepage)
        - Page1
        - Page2

    I have make first my German Homepage and then i have make a Copy of this Site
    and rename it to MyHomepageNameEN
    Is this correct so????
    Must i activate "Relate copied items to original" ???

    Then i have look at this Line in my web.config
    <add key="umbracoHideTopLevelNodeFromPath" value="true" />
    OK this is corect..

    Then i have make the xsl and create a Macro..
    The Makro i have insert in my Masterpage


    OK Then i have test the Site:
    I see the Language Flags on the Top
    and when i click on the English Language Flag the Site change to en.aspx its good..

    But when i click the next Site in my Homepage then i come back to my German Site ?????

     

    Can you me not send a Screenshot of your Node Structure and Settings in the Hostname please
    from this Site http://www.controlpartners.nl/ 

    Thanks




  • Rasmus Berntsen 215 posts 253 karma points c-trib
    Oct 22, 2009 @ 10:05
    Rasmus Berntsen
    0

    Must i activate "Relate copied items to original" ???

    You don't need to, no. I usually don't do this.

    umbracoHideTopLevelNodeFromPath should be "false":

    <add key="umbracoHideTopLevelNodeFromPath" value="false" />

  • Wachter Bernd 48 posts 68 karma points
    Oct 22, 2009 @ 10:28
    Wachter Bernd
    0

    Hi,

    Yes it works now with "false" !!!

    but al my Pathes where i set for my Flash Galerie Files now uncorect ??

    I have set my Path for my Flash Galerie wich use XML to Load Images like so:

    /FlashBanners/Galerie/Rooms/room.xml

    And now i have another Path with /de and /en

    and my XML Files where not find ????
    Gives a way to set my Path in an other way ????

  • Rasmus Berntsen 215 posts 253 karma points c-trib
    Oct 22, 2009 @ 10:37
    Rasmus Berntsen
    0

    Isn't it enough just to add two ".." ??

    "../FlashBanners/Galerie/Rooms/room.xml"

  • Wachter Bernd 48 posts 68 karma points
    Oct 23, 2009 @ 12:50
    Wachter Bernd
    0

    Hi Richard,

    My Site works now perfect with your Code ....

    One Question i have..
    When i Install the Media Galerie Package i become a Folder under my Root Folder "Media Galerie"

     

    Its nice then i have under my Flags <divflag>
    A Flag DE and a Flag EN and i become  another Flag without a Image Named Media Galerie !!!!

    What must i do does i can set this in the Xslt File does only my Language Folders are show in the DIV Tag of my
    Flags ????

    Content
      - de
        ..Sites
      - en
       ..Sites
      - Media Galerie

    I will only my Flags generate with the two Language Folders--- like my Homepagefolders
    and not become automatic another Flag for Media Galerie ???? 


  • Richard Soeteman 4035 posts 12842 karma points MVP
    Oct 23, 2009 @ 14:25
    Richard Soeteman
    0

    Hi,

    So you only want to select the HomepageFolders? You need to get the documenttype aias of the Homepage folder and extend the foreach in the xslt .
    Change <xsl:for-each select="$currentPage/ancestor::root/node">

    Into <xsl:for-each select="$currentPage/ancestor::root//node[@nodeTypeAlias='alias of the documenttype ]">

    And it should work.

    Cheers,

    Richard
     

  • Wachter Bernd 48 posts 68 karma points
    Oct 24, 2009 @ 14:05
    Wachter Bernd
    0

    Hi Richard,

    Yes it works !

     

    Thank You

  • vijay 129 posts 152 karma points
    Dec 30, 2009 @ 10:16
    vijay
    0

    Hi Richard / Brend,

    Can you send me sample package which display multi lanuage website.

    Thanks in advance,

    vijay.

Please Sign in or register to post replies

Write your reply to:

Draft