Copied to clipboard

Flag this post as spam?

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


  • Mike Taylor 155 posts 353 karma points
    Nov 20, 2009 @ 16:57
    Mike Taylor
    0

    Contour for multi-lingual sites

    I've just watched the excellent video on how to manage forms for multi-lingual sites at http://umbraco.org/documentation/videos/umbraco-pro/contour/manage-multi-language-forms

    I have a question - is it possible to apply the same technique (#DictionaryItem) to the "Submit" button (and the "Previous" and "Next" buttons in multi-step forms)? Or are we stuck with English for these elements?

    Mike

  • Mike Taylor 155 posts 353 karma points
    Nov 20, 2009 @ 17:06
    Mike Taylor
    0

    Also noticed that the validation messages could do with allowing #DictionaryItem references, so you could have multi-lingual validation error messages. For example, for a mandatory field, you could enter "#ContactName #ContactMandatory" as the validation "Required Error Message", and then have dictionary items eg:

    #ContactName = "Name" / "Nom"
    #ContactMandatory = "is required." / "est obligatoire"

    Make sense?

    M

  • Comment author was deleted

    Nov 20, 2009 @ 18:23

    Hi Mike,

    Sure it is possible:

    Submit button, will fetch it's value from the dictionary item submit (if it exists)
    Next button, from next
    Previous button from previous

    And you can also use dictionary items in the validation messages, just create a dictionary items and then instead of having a static value in the Form properties set it to the dictionary item #myitem

     

  • Mike Taylor 155 posts 353 karma points
    Nov 23, 2009 @ 17:35
    Mike Taylor
    0

    Hi Tim

    That doesn't seem to work - take a look at this quick screencast...
    http://screencast.com/t/NWNjZDBhOT

    Any ideas? Should it work?

    Mike

  • Comment author was deleted

    Nov 23, 2009 @ 20:34

    Hi Mike,

    Yes, you can only add 1 dictionary item.

    So you should use #ContactRequired

    And in that copy you'll have to add the field name. So "Name ist obligatorisch".

    Or you could set the required error message on the settings tab to #ContactRequired and use this syntax.

    {0} ist obligatorisch in the dictionary item.

    So if you set the requred error message on the settings it's for all messages on the form. If you set it on the field it's only for that specific field.

  • Mike Taylor 155 posts 353 karma points
    Nov 25, 2009 @ 15:29
    Mike Taylor
    0

    Hi Tim

    The {0} doesn't seem to work - the error message just shows "{0} ist obligatorisch" - see http://screencast.com/t/YWViM2M4MGY

    Any ideas? Have I missed something?

    Thanks,

    Mike

  • Comment author was deleted

    Nov 25, 2009 @ 15:57

    Hi Mike,

    If you set the message on the field itself it is for this field only. And the {0} syntax won't work. Since it is for a single specific field, and you'll now the caption ..

    But if you set for the entire form (on the second tab) then you can use the {0} syntax. But you'll also have to remove the message on the field.

    Cheers,
    Tim

  • Mike Taylor 155 posts 353 karma points
    Nov 30, 2009 @ 12:29
    Mike Taylor
    0

    Hi Tim

    Ah right, I didn't spot that setting on the second tab. I've tried that, and it's still not quite working as I'd like. In my dictionary item ("ContactRequired"), I've put "{0} ist obligatorisch", but I've also used dictionary items for my form field names ("#ContactName", "#ContactEmail", "#ContactMessage").

    If I put #ContactRequired into the setting on the second tab, the errors shown are things like "#ContactName ist obligatorisch", so it's then not picking up the field names from the Dictionary.

    See http://screencast.com/t/NDU2YThlY

    Cheers,

    Mike

  • Kalle Ekstrand 181 posts 259 karma points c-trib
    Aug 31, 2011 @ 10:45
    Kalle Ekstrand
    0

    I have this problem as well.

    But mine is narrowed down to the "Settings" tab. And I am not able to use dictionary items for Required error message and Invalid error message.

    Is the syntax below wrong? Because it does not work...

    {0} #MandatoryErrorMessage
    {0} #InvalidErrorMessage

    Best regards,

    Kalle Ekstrand

  • Comment author was deleted

    Aug 31, 2011 @ 10:45

    Hey Kalle,

    You need to set the error message to #dictionaryKey

    And then in your key have {0} is mandatory

  • Kalle Ekstrand 181 posts 259 karma points c-trib
    Aug 31, 2011 @ 11:03
    Kalle Ekstrand
    0

    Thanks Tim,

    That makes sense. Now it works like a charm.

    //kalle

Please Sign in or register to post replies

Write your reply to:

Draft