Copied to clipboard

Flag this post as spam?

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


  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jan 20, 2012 @ 17:09
    Bjarne Fyrstenborg
    0

    Change country names

    Is it possible to use a dictionary item on country names?

    or perhaps in a future version add a Dictionary item name field like on payment and delivery methods?

    perhaps a similar property on currencies too, if you don't want to use the ISO code in frontend, but e.g. Danish krone instead of DKK or € instead of EUR ..

    Bjarne

  • Rune Grønkjær 1372 posts 3103 karma points
    Jan 22, 2012 @ 10:54
    Rune Grønkjær
    0

    Hi Bjarne,

    You can easily use dictionary items for country names. Just create dictionary items and use the country name as alias. Then you can select the dictionary item by the name of the country.

    /Rune

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jan 22, 2012 @ 14:32
    Bjarne Fyrstenborg
    0

    Hi Rune

    I have tried to create different dictionary items with alias cnDenmark, denmark and Denmark .. but it doens't seem to work in Tea Commerce section?

    I want to translate the country names in backend and the confirmation e-mail also use the right language for the country name.. but payment and delivery methods also have a field / property for this to insert a dictionary item alias.. which contries doesn't have.

    Bjarne

  • Rune Grønkjær 1372 posts 3103 karma points
    Jan 23, 2012 @ 08:26
    Rune Grønkjær
    0

    Hi Bjarne,

    To change it in the Tea Commerce admin you have to edit the TeaCommerce/teaCommerceAdminOrder.xslt.
    To change the confirmation mail you edit the TeaCommerce/teaCommerceEmailTemplate.xslt

    Both of them will support your dictionary items.

    /Rune

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jan 23, 2012 @ 18:01
    Bjarne Fyrstenborg
    0

    Okay, in xslt it uses the country property - the selected from the dropdown in frontend.

    <xsl:if test="$order/properties/country != ''">
      <tr>
        <td><xsl:value-of select="umbraco.library:GetDictionaryItem('Country')"/></td>
        <td>
          <xsl:value-of select="$order/properties/country"/>
        </td>
      </tr>
    </xsl:if>

    How can I add the right country dictionary item here? e.g. <xsl:value-of select="umbraco.library:GetDictionaryItem('cnDenmark')"/>

    and in cart step 2 it is something like:

    <select id="country" name="country">
      <xsl:for-each select="$countries/country">
        <option value="{@id}" ISOCountryCode="{@countryCode}">
          <xsl:if test="$currentCountry/@id = @id">
            <xsl:attribute name="selected">true</xsl:attribute>
          </xsl:if>
          <xsl:value-of select="@name" />
        </option>
      </xsl:for-each>
    </select>

    but it doesn't seem to be a solution to translate the country nodes in Tea Commerce section, like it's you have done with Payment and Shipping methods.

    Where in Payment and Shipping methods in has a field Dictionary item name to specify the dictionary item alias:


    Bjarne

  • Rune Grønkjær 1372 posts 3103 karma points
    Jan 24, 2012 @ 13:27
    Rune Grønkjær
    1

    Hi Bjarne,

    Something like this.

    <xsl:iftest="$order/properties/country != ''">
      <tr>
        <td><xsl:value-ofselect="umbraco.library:GetDictionaryItem('Country')"/></td>
        <td>
          <xsl:value-ofselect="umbraco.library:GetDictionaryItem( $order/country/@name)"/>
        </td>
      </tr>
    </xsl:if>

    /Rune

     

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jan 24, 2012 @ 18:31
    Bjarne Fyrstenborg
    0

    Hi Rune

    Thanks, it works.. then the dictionary item of the country name must match the country node name in Tea Commerce section to work?

    Is there any way to translate the country node names in Tea Commerce section? right now it is in English both when the backend use Danish and English.

    Bjarne

  • Rune Grønkjær 1372 posts 3103 karma points
    Jan 25, 2012 @ 08:13
    Rune Grønkjær
    0

    Hi Bjarne,

    That is not possible, no. But if your client really needs it feel free to write us at [email protected] and we can give you an estimate on what it would take.

    /Rune

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jan 25, 2012 @ 11:12
    Bjarne Fyrstenborg
    0

    Hi Rune

    Okay, that it not important right now.. and the language will be in Danish ... perhaps other languages later.. so I can just name the countries in Tea Commerce section in Danish for now..

    but perhaps in a future version you can add the property field "dictionary item name" on countries and currencies like payment and shipping methods have now, so it's possible to using dictionary items on countries and currencies, if they don't use a sign or ISO code for the currency name.

    Bjarne

Please Sign in or register to post replies

Write your reply to:

Draft