Copied to clipboard

Flag this post as spam?

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


  • Rachel Shearer 2 posts 22 karma points
    Nov 05, 2013 @ 01:02
    Rachel Shearer
    0

    Edit <a>home</a> in top menu navigation to deal with multiple languages

    Hello,I hope someone can help me. I am currently working on a website that uses a multi-language selection package. My question is how can I edit the xslt within the top menu navigation to deal with different text for home?

    If more information is required I will be happy to provide, this is my first post.

     

    many thanks

    Rachel

     

     

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Nov 05, 2013 @ 08:11
    Chriztian Steinmeier
    1

    Hi Rachel – welcome to Our!

    You can use the Dictionary in the Settings section to create a key for the "Home" label, which you can then retrieve from XSLT using the GetDictionaryItem() extension:

    <a href="/">
        <xsl:value-of select="umbraco.library:GetDictionaryItem('HomeLabel')" />
    </a>
    

    If you're going to translate a lot of text in your XSLT files, have a look at an article I wrote about handling the Dictionary in XSLT.

    /Chriztian

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Nov 05, 2013 @ 08:19
    Dennis Aaen
    1

    Hi Rachel and welcome to our :)

    One way you could do it when you work with a multilingual site is by using dictionary items.

    In XSLT you can do it this way.

    <a href="/"><xsl:value-of select="umbraco.library:GetDictionaryItem('FrontPage')"/>

    So the way you can create a dictionary item is by go to the Settings section --> Dictionary. Then you create a dictionary item, The name of the item, is the key so the name must be unique. When you have created the dictionary items you will see some multiline textboxes for each langauges you have on your installation there you have to writte the translation of the word or phrase. I have been on projects where we also have used empty dictionary as folder.

    So If you have a frontpage with more than one dictionary It can benefit to group them. The way i do it, is by create a dictionary item e.g Frontpage Folder and under there I create the dictionary I want to be translated. But the name of the dictionary must still be unique.

    If you need to traslate somthing in one of your templates, that can also be done by using dictionary items, The way you add a dictionary item in a tempate is by using this.

    <umbraco:item field="#FrontPage "runat="server"/>

    Hope this helps you and make sense.If you have more questions to this topic keep asking, and I will try to help you out.

    /Dennis

  • Rachel Shearer 2 posts 22 karma points
    Nov 17, 2013 @ 20:05
    Rachel Shearer
    0

    Thanks for the help :-)

Please Sign in or register to post replies

Write your reply to:

Draft