Copied to clipboard

Flag this post as spam?

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


  • Eric 35 posts 55 karma points
    Jan 13, 2010 @ 15:36
    Eric
    0

    problem using Dictionary - Where am I wrong ?

    I have a fresh installation of umbraco (4.0.3) and for the first time I'm playing around dictionary Items.

    Here are the steps:

    1.setting Languages in tab settings - in my case, it looks like this:

    • Italian (Italy)
    • English (United Kingdom)
    • German (Germany)
    • French (France)

    2. adding 1 Entry to the Dictionary (I name it brandNewEntry) and fulfill translation fields.
    Now, clicking on Dictionary, brandNewEntry has been added and all languages have a green checked-on.

    3 on a new template, using xhtml1.1 dtd, I'm calling my dictionary like this (using insert umbraco dictionary item)

    <umbraco:Item field="#brandNewEntry" textIfEmpty="alt Text for #brandNewEntry" runat="server"></umbraco:Item>

    4. I also want to use xlt for the header so I wrote:

    <xsl:template match="/">

    <xsl:variable name="dicoItem">brandNewEntry</xsl:variable>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title><xsl:value-of select="umbraco.library:GetDictionaryItem($dicoItem)"/></title>

    <meta name="Keywords">

    <xsl:attribute name="content"><xsl:value-of select="umbraco.library:GetDictionaryItem('brandNewEntry')"/></xsl:attribute></meta>

    </xsl:template>

    As you can see, I tried two solutions for getting my dictionary entry with method GetDictionaryItem, using the name or a variable. But both don't work and in html code, every call to GetDictionaryItem is just a blank while the page only displays "alt Text for #brandNewEntry".

    Where Am I wrong ? Thanks for your help.

  • anthony hall 222 posts 536 karma points
    Jan 13, 2010 @ 15:48
    anthony hall
    0

    have you added host names.  Is you site structure like this

    - go to the node "en" in the content tree right mouse , select manage host name. Enter in you domain name ( doesn't need to be correct ) enter language "english"

    - update
    - Do the same for other languages. 
    - Now go developer, dictionary and enter in the keywords

     

     

  • anthony hall 222 posts 536 karma points
    Jan 13, 2010 @ 15:50
    anthony hall
    0

    Sorry mean to say. 

    Is you site structure like this

    Content 
     - En
    - Fr

    So you need to add the host names at the root of each language

  • Eric 35 posts 55 karma points
    Jan 13, 2010 @ 16:05
  • Eric 35 posts 55 karma points
    Jan 13, 2010 @ 16:11
    Eric
    0

    If I use manage host name, I have a string which have been previously deleted (so an old translation and not the actual one) Is this a cache problem ? Is it possible to force cache deleting ?

Please Sign in or register to post replies

Write your reply to:

Draft