Apache

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • general.field-required translation not working

    0 answers - 2751 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Thanks a lot Jason and Bruno! It Works :)
    Joost
    bericht
    Van: Jason Johnston [mailto:cocoon (AT) lojjic (DOT) net]
    Verzonden: Wednesday, January 18, 2006 3:30 PM
    Aan: users (AT) cocoon (DOT) apache.org
    : Re: general.field-required translation not working
    Joost Kuif wrote:
    Hi,
    I'm using cforms and trying to override the general.field-required
    message for the empty but 'required' (in formdefinition) fields.
    I have the line below in a messages.xml:
    <message key="general.field-required">Dit is een verplicht
    veld.</message>
    For testing purposes: If i specify this key in a label of a field, the
    string "Dit is een veplicht veld" is correctly translated for this
    field-label. So cocoon is able to find the needed key in my
    messages.xml
    with the keys i specify in the formdefinition.
    the translation for required="true" in the <fd:fieldtag is NT
    translated into a proper message if a user leaves a (required) field
    empty.
    AFAIK this should be handled somewhere in the forms*.xsl pages.
    Unfortunalely i cannot find the problem. Can someone help me? Thanks a
    lot!
    Joost.
    Example:
    The code below works, the specified label is overruled by the one in
    my
    messages.xml:
    <fd:label>
    <i18n:text i18n:key="general.field-required">this should be
    overruled</i18n:text>
    </fd:label>
    The i18n elements produced by CForms all have an attribute
    i18n:catalogue="forms", which means that the i18n transformer will
    always look for a catalogue configured with the id "forms" to get its
    translations for these elements. The example above works because you're
    not telling it to use a specific catalogue, so it uses whichever default
    catalogue you have configured in your sitemap.
    You need to have something like this in your sitemap:
    <map:transformer name="i18n"
    src="">
    <catalogues default="default">
    <catalogue id="forms" name="Messages" location="path/to/forms"/>
    <catalogue id="default" name="Messages" location="path/to/i18n"/>
    </catalogues>
    </map:transformer>
    And make sure your overridden CForms messages are in the "forms"
    catalogue. See the I18nTransformer docs for more details about setting
    up catalogues.
    Hope that helps
    To unsubscribe, e-mail: users-unsubscribe (AT) cocoon (DOT) apache.org
    For additional commands, e-mail: users-help (AT) cocoon (DOT) apache.org
    To unsubscribe, e-mail: users-unsubscribe (AT) cocoon (DOT) apache.org
    For additional commands, e-mail: users-help (AT) cocoon (DOT) apache.org

Re: general.field-required translation not working


max 4000 letters.
Your nickname that display:
In order to stop the spam: 0 + 9 =
QUESTION ON "Apache"

EMSDN.COM