Hallo Forum,
ich habe Typo3-Version 4.1.6 und th_Mailformplus 4.0.7 mit sr_freecap 1.0.3 am Laufen. Die Seite ist mehrsprachig, funktioniert soweit auch alles bis auf das Umsschalten der Sprache im th_mailformplus. Ich habe schon sämtliche Foren-Einträge zu dem Thema durch, hab aber keine Lösung gefunden.
Das HTML-Template funktioniert, die Verlinkung zur locallang.php wird angesprochen, allerdings werden nur die deutschen Feldnamen verwendet und nicht gegen die englischen Feldnamen "ausgetauscht".
Hier der entsprechende Code im Typoscript:
#Default Sprache
#--------------------------------------------------------------------------------------------
config.linkVars = L
config.sys_language_uid = 0
config.language = de
...
# mailformplus
#-----------------------------------------------------------------------------------------------
# path to language file
plugin.tx_thmailformplus_pi1.langFile = fileadmin/templates/locallang.php
# specify the symbol for required fields
plugin.tx_thmailformplus_pi1.default.required_marker = *
# receiver of the admin mail
plugin.tx_thmailformplus_pi1.default.email_to =
# subject of the admin mail is set to the subject the user entered in the form
plugin.tx_thmailformplus_pi1.default.email_subject = TEXT
plugin.tx_thmailformplus_pi1.default.email_subject.data = GPVar:subject
# the user mail is sent to the email address the user entered in the form
plugin.tx_thmailformplus_pi1.default.email_sendtouser = email
# usbject of the user mail
plugin.tx_thmailformplus_pi1.default.email_subject_user = Your contact request
# sender of the mails
plugin.tx_thmailformplus_pi1.default.email_sender =
# if language is german, set another text as subject of the user mail
[globalVar = GP:L = 3]
plugin.tx_thmailformplus_pi1.default.email_subject_user = Ihre Kontaktanfrage
[global]
# errorChecks for the form fields
plugin.tx_thmailformplus_pi1.fieldConf {
name {
errorCheck = required
}
email {
errorCheck = required,email
}
text {
errorCheck = required
}
}
plugin.tx_thmailformplus_pi1.freecapFieldname = captchafield
...
# Sprachumstellung
#-----------------------------------------------------------------------------------------------
[globalVar = GP:L=3]
config.sys_language_uid = 3
config.language = en
seite = PAGE
seite.10.marks.SPRACHE = TEXT
seite.10.marks.SPRACHE.wrap = <a href="index.php?id=|&L=0"><img src="../images/grafiken/flagge_deutschland1.gif" width="15" height="10" hspace="8" border="0" alt="German" /></></a>
seite.10.marks.ANSPRECH.wrap = <img src="../fileadmin/images/grafiken/ansprechpartner_e.jpg" hspace="0" border="0" alt="Englisch" />
[global]
<-- ###TEMPLATE_FORM### begin -->
<div class="mailformplus_contactform">
###ERROR###
<form name="contact_form" method="post" action="###REL_URL###">
<fieldset>
<legend>###LLL:legend###</legend>
<input type="hidden" name="id" value="###PID###" />
<input type="hidden" name="L" value="###value_L###" />
<input type="hidden" name="type" value="###value_type###" />
<div>
<br/>
<label for="name">###LLL:name######required_name###</label>
<input type="text" name="name" id="name" value="###value_name###"/>
<br/>
<label for="subject">###LLL:subject###</label>
<input type="text" name="subject" id="subject" value="###value_subject###"/>
<br/>
<label for="email">###LLL:email######required_name###</label>
<input type="text" name="email" id="email" value="###value_email###"/>
<br/>
<label for="phone">###LLL:phone###</label>
<input type="text" name="phone" id="phone" value="###value_phone###"/>
<br/>
<label for="text">###LLL:text######required_name###</label>
<textarea cols="50" rows="5" name="text" id="text" style="width:320px;">###value_text###</textarea>
<br/>
<div class="caption">###LLL:contact_via###</div>
<input type="radio" name="contact_via" value="email" id="contact_email" style="border-style:none;" ###checked_contact_via_email### /><label class="radio_caption" for="contact_email">###LLL:contact_via_email###</label><br />
<input type="radio" name="contact_via" value="phone" id="contact_phone" style="border-style:none;" ###checked_contact_via_phone### /><label class="radio_caption" for="contact_phone">###LLL:contact_via_phone###</label>
<br/>
<br/>
<p>###LLL:required_fields###</p>
<br/><br/>
<!--###CAPTCHA_INSERT### this subpart is removed if CAPTCHA is not enabled! -->
<div class="tx-your-extension-id-pi1-captcha">
<label for="tx_your_extension_id_pi1_captcha_response">###SR_FREECAP_NOTICE###</label>
###SR_FREECAP_CANT_READ###
<br />
<input type="text" size="15" id="tx_your_extension_id_pi1_captcha_response" name="captchafield" title="###SR_FREECAP_NOTICE###" value="">
###SR_FREECAP_IMAGE###
</div>
<input type="submit" value="###LLL:submit###"/>
</div>
</fieldset>
</form>
</div>
<!-- ###TEMPLATE_FORM### end -->
<?php
/**
* Language labels for mailformplus templates
*/
$LOCAL_LANG = Array (
'de' => Array (
'name' => 'Name_de',
'subject' => 'Betreff',
'email' => 'E-Mail',
'phone' => 'Telefonnummer',
'text' => 'Text',
'legend' => 'Bitte füllen Sie das Formular aus',
'required_fields' => 'Mit <strong>*</strong> gekennzeichnete Felder <strong>müssen</strong> ausgefüllt werden.',
'contact_via' => 'Bitte kontaktieren Sie mich per',
'contact_via_email' => 'E-Mail',
'contact_via_phone' => 'Telefon',
'error_email' => '<span class="error">Bitte geben Sie eine korrekte <strong>E-Mailadresse</strong> ein!</span><br/>',
'error_name' => '<span class="error">Bitte füllen Sie das Feld <strong>Name</strong> aus!</span><br/>',
'error_text' => '<span class="error">Bitte füllen Sie das Feld <strong>Text</strong> aus!</span><br/>',
'submit' => 'Absenden',
),
'default' => Array (
'name' => 'Name_default',
'subject' => 'Betreff',
'email' => 'E-Mail',
'phone' => 'Telefonnummer',
'text' => 'Text',
'legend' => 'Bitte füllen Sie das Formular aus',
'required_fields' => 'Mit <strong>*</strong> gekennzeichnete Felder <strong>müssen</strong> ausgefüllt werden.',
'contact_via' => 'Bitte kontaktieren Sie mich per',
'contact_via_email' => 'E-Mail',
'contact_via_phone' => 'Telefon',
'error_email' => '<span class="error">Bitte geben Sie eine korrekte <strong>E-Mailadresse</strong> ein!</span><br/>',
'error_name' => '<span class="error">Bitte füllen Sie das Feld <strong>Name</strong> aus!</span><br/>',
'error_text' => '<span class="error">Bitte füllen Sie das Feld <strong>Text</strong> aus!</span><br/>',
'submit' => 'Absenden',
),
'en' => Array (
'name' => 'Namen_en',
'subject' => 'Subject',
'email' => 'E-Mail',
'phone' => 'Phone',
'text' => 'Text',
'legend' => 'Please fill out the form',
'required_fields' => 'Fields marked with <strong>*</strong> are <strong>required</strong>.',
'contact_via' => 'Please contact me via',
'contact_via_email' => 'E-Mail',
'contact_via_phone' => 'Phone',
'error_email' => '<span class="error">Please fill out correct <strong>email</strong>!</span><br/>',
'error_name' => '<span class="error">Please fill out the field <strong>Name</strong>!</span><br/>',
'error_text' => '<span class="error">Please fill out the field <strong>Text</strong>!</span><br/>',
'submit' => 'Submit',
),
);
?>
Hat jemand eine Lösung? Vielen Dank im Voraus für jede Hilfe!!!