Yes, the dictionary item is case-sensitive. Use the toolbar icon when you're editing a template to easily select the dictionary item you want to appear.
Yes, you can put an entire phrase (with spaces, punctuation, etc.) in a dictionary item.
In your xslt you would normally have something like <xsl:value-of select="@nodeName" />. You would want to change that to use a dictionary lookup... something like this:
This assumes that you've got a dictionary item with an alias that matches the nodeName.
Or if you've got a property on your docType that contains the appropriate dictionary key to look up (let's call it 'navDictionaryKey' for this example) you'd have something more like this...
If this doesn't make sense, show us the xslt code that you use to make your navigation without the GetDictionaryItem() and we'll show you how to plug it in.
Sweet. I don't have time to test these solutions at this exact moment but I certainly will as soon as I can . Thanks for your detailed response! Now, for the next big task:
What is the most effective way toggle between these two Homes / Sites? I am still
confused that they have the same page name / url. I have assigned them fake subdomains as intructed elsewhere on the forum, but honestly I don't see how this is going to do the trick.
I have a dropdown at
the top of the page that offers Spanish and English. How can I make
the users' choice select the correct home page and subpages?
Ok, assuming I set up my dictionary items properly (I hadn't!), this works great. My new problem is the Page Name. This needs to be inserted in the template(s), but when I click on "Insert Umbraco ductionary item," all it gives me are the dictionary items themselves. I need this, obviously, to be the dynamic page name. I need the system to get the page name, then look for it in the Dictionary. How to accomplish?
I have an interesting problem I hope someone out there has solved before. I have a multilingual site whose main nav is constructed of IMAGES with text in them. Therefore, I'll need to load different images depending on what language is selected.
The layout of the page is such that the main nav macro must be in several different templates and I wish not to re-create all of these templates for every language.
Can anyone think of a way I can select these images dynamically? They are CSS background images and Dictionary Items are a problem because the page names / nodeNames have SPACES in them, eg. "Client Solutions". I can't give the link an id="nav_Client Solutions". Do you see my problem here?
Before I added the other languages / sites, I was getting the nav images by writing the ID of the page as the ID of the link, as below:
The pages ARE related to the original (when I copied the original site and duplicated it, I check the box), but I'm not sure how to get the "Related" ID. On the original (English) site, the ID of the About page is 1081, and on the Spanish site, the About page is 1529. Why is 1081 being written to the page as the ID even though I'm on the Spanish About page?
In your situation I would look at ImageGen (http://our.umbraco.org/projects/imagegen) to dynamically create the text as a graphic based on the dictionary item. You can overlay text (using any font) on top of your background image or just create text with a transparent background to appear above your background image. Much easier than creating them all ahead of time and making css entries and ids for everything.
No, ImageGen creates real images rather than using js or flash to replace text with different text. In a sense, this is an old school approach but since you said you were using images for the nav anyway... this could be an easy solution. For instance, check out an example at
http://www.traceworks.com/home/our-product.aspx, which uses ImageGen in
this way.
ImageGen does much more than just text, but it also does text very well if you need it.
I am already using Cufon in this case, and it's too late in the implementation to go with another solution-- but ImageGen looks AWESOME, and I will Definitely keep it in mind for future projects. Meantime, I was able to do this pretty easily using the ID's and selecting them in the CSS.
multilanguage sites - dictionary entries
Hi,
Are dictionary items case-sensitive? And can they be entire phrases (i.e.: with spaces between words)?
Thanks,
Garrett
Yes, the dictionary item is case-sensitive. Use the toolbar icon when you're editing a template to easily select the dictionary item you want to appear.
Yes, you can put an entire phrase (with spaces, punctuation, etc.) in a dictionary item.
cheers,
doug.
Well I will mainly be using the dictionary for the NAV items, which are written out via XSLT. Can I put a dictionary item in an XSLT file??
//Garrett
You bet!
In your xslt you would normally have something like <xsl:value-of select="@nodeName" />. You would want to change that to use a dictionary lookup... something like this:
This assumes that you've got a dictionary item with an alias that matches the nodeName.
Or if you've got a property on your docType that contains the appropriate dictionary key to look up (let's call it 'navDictionaryKey' for this example) you'd have something more like this...
If this doesn't make sense, show us the xslt code that you use to make your navigation without the GetDictionaryItem() and we'll show you how to plug it in.
cheers,
doug.
Sweet. I don't have time to test these solutions at this exact moment but I certainly will as soon as I can . Thanks for your detailed response! Now, for the next big task:
What is the most effective way toggle between these two Homes / Sites? I am still confused that they have the same page name / url. I have assigned them fake subdomains as intructed elsewhere on the forum, but honestly I don't see how this is going to do the trick.
I have a dropdown at the top of the page that offers Spanish and English. How can I make the users' choice select the correct home page and subpages?
Thanks again,
Garrett
Ok, assuming I set up my dictionary items properly (I hadn't!), this works great. My new problem is the Page Name. This needs to be inserted in the template(s), but when I click on "Insert Umbraco ductionary item," all it gives me are the dictionary items themselves. I need this, obviously, to be the dynamic page name. I need the system to get the page name, then look for it in the Dictionary. How to accomplish?
Thanks again.
Garrett
I have an interesting problem I hope someone out there has solved before. I have a multilingual site whose main nav is constructed of IMAGES with text in them. Therefore, I'll need to load different images depending on what language is selected.
The layout of the page is such that the main nav macro must be in several different templates and I wish not to re-create all of these templates for every language.
Can anyone think of a way I can select these images dynamically? They are CSS background images and Dictionary Items are a problem because the page names / nodeNames have SPACES in them, eg. "Client Solutions". I can't give the link an id="nav_Client Solutions". Do you see my problem here?
Before I added the other languages / sites, I was getting the nav images by writing the ID of the page as the ID of the link, as below:
The pages ARE related to the original (when I copied the original site and duplicated it, I check the box), but I'm not sure how to get the "Related" ID. On the original (English) site, the ID of the About page is 1081, and on the Spanish site, the About page is 1529. Why is 1081 being written to the page as the ID even though I'm on the Spanish About page?
Thanks,
Garrett
In your situation I would look at ImageGen (http://our.umbraco.org/projects/imagegen) to dynamically create the text as a graphic based on the dictionary item. You can overlay text (using any font) on top of your background image or just create text with a transparent background to appear above your background image. Much easier than creating them all ahead of time and making css entries and ids for everything.
cheers,
doug.
Is this like Cufon?
No, ImageGen creates real images rather than using js or flash to replace text with different text. In a sense, this is an old school approach but since you said you were using images for the nav anyway... this could be an easy solution. For instance, check out an example at http://www.traceworks.com/home/our-product.aspx, which uses ImageGen in this way.
ImageGen does much more than just text, but it also does text very well if you need it.
cheers,
doug.
I am already using Cufon in this case, and it's too late in the implementation to go with another solution-- but ImageGen looks AWESOME, and I will Definitely keep it in mind for future projects. Meantime, I was able to do this pretty easily using the ID's and selecting them in the CSS.
Thanks as always,
Garrett
is working on a reply...