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.
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:
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.
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
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: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
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.
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
Thanks for the help :-)
is working on a reply...