Copied to clipboard

Flag this post as spam?

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


  • Garrett Fisher 341 posts 496 karma points
    Feb 25, 2010 @ 21:57
    Garrett Fisher
    0

    multilanguage sites - dictionary entries

    Hi,

    Are dictionary items case-sensitive? And can they be entire phrases (i.e.: with spaces between words)?

    Thanks,

    Garrett

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Feb 25, 2010 @ 22:44
    Douglas Robar
    0

    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.

  • Garrett Fisher 341 posts 496 karma points
    Feb 26, 2010 @ 23:00
    Garrett Fisher
    0

    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

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Feb 27, 2010 @ 16:41
    Douglas Robar
    2

    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:

    <xsl:value-of select="umbraco.library:GetDictionaryItem(@nodeName)" />

    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...

    <xsl:value-of select="umbraco.library:GetDictionaryItem( data[@alias='navDictionaryKey'] )" />

    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.

  • Garrett Fisher 341 posts 496 karma points
    Mar 01, 2010 @ 20:36
    Garrett Fisher
    0

    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

  • Garrett Fisher 341 posts 496 karma points
    Mar 01, 2010 @ 21:51
    Garrett Fisher
    0

    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

  • Garrett Fisher 341 posts 496 karma points
    Mar 12, 2010 @ 20:15
    Garrett Fisher
    0

    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:

    <a href="{umbraco.library:NiceUrl(@id)}" id="nav_{@id}" title="{@nodeName}">

    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

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Mar 12, 2010 @ 21:37
    Douglas Robar
    0

    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.

  • Garrett Fisher 341 posts 496 karma points
    Mar 12, 2010 @ 22:22
    Garrett Fisher
    0

    Is this like Cufon?

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Mar 13, 2010 @ 12:08
    Douglas Robar
    0

    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.

  • Garrett Fisher 341 posts 496 karma points
    Mar 17, 2010 @ 20:39
    Garrett Fisher
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft