Seite 1 von 1
Sprachen Falsch Konfiguriert
Verfasst: Mi 7. Mär 2007, 16:08
von Snuppel007
Hallo Liebe Contentenido-Gemeinde,
ich hab da ein klitzekleines Problem

als ich Contenido Installierte, hatte ich nur die Info das es eine reine Englische Webseite werden soll, also hab ich unter Administration Deutsch zu Englisch gemacht.
Aber es kommt immer anders als man denkt ..., nu ist die Seite auch in Deutsch da und jetzt hauts nicht mehr mit der Übersetzung hin zB. unter Kontakte.
Im Englischen wird mir alles auf Deutsch angezeigt und im Deutschen alles auf Englisch.
Leider ist die Website schon mächtig angewachsen, deswegen hoffe ich Ihr könnt mir helfen ..., kann man irgendwo Einstellen welche Sprache welche ist, oder ist es Hoffnungslos???
Gruß, Snuppel
Verfasst: Mi 7. Mär 2007, 16:40
von stony
das liegt bestimmt am Kontaktmodul, kannst das es mal posten?
Verfasst: Mi 7. Mär 2007, 17:12
von Snuppel007
Na klaro doch. Hab das Problemchen anderst gelöst. Hab für jede Sprache (sind ja nur 2) ein eigenes Kontaktmodul und Template erstellt.
Nicht gerade sauber, aber erfüllt seinen zweck.
Hier das Englische Kontakt-Modul (das Deutsche ist das gleiche, nur in DE)
Code: Alles auswählen
<?php
#Includes
cInclude("classes", "class.phpmailer.php");
if (!isset ($_POST['send'])) {
#Form has not been sent yet
cInclude('classes', 'class.article.php');
cInclude('classes', 'class.template.php');
#Create contact form
echo '<form name="kontaktform" id="kontaktform" method="post" action="'.$sess->url("front_content.php?idcat=$idcat&idart=$idart&parentid=$parentid").'">';
echo '<input type="hidden" name="send" value="1">';
if (!is_object($tpl)) {
$tpl = new Template;
}
$tpl->set("s", "ANREDE", mi18n("Address"));
$tpl->set("s", "ANREDE_OPTION1", mi18n("Mr."));
$tpl->set("s", "ANREDE_OPTION2", mi18n("Mrs."));
$tpl->set("s", "NACHNAME", mi18n("Name"));
$tpl->set("s", "VORNAME", mi18n("First Name"));
$tpl->set("s", "FIRMA", mi18n("Company"));
$tpl->set("s", "STRASSE", mi18n("Street/No"));
$tpl->set("s", "PLZORT", mi18n("ZIP-Code/City"));
$tpl->set("s", "TELEFON", mi18n("Telephone"));
$tpl->set("s", "EMAIL", mi18n("E-Mail"));
$tpl->set("s", "ANLIEGEN", mi18n("Message"));
$tpl->set("s", "PFLICHTFELDER", mi18n("Mandatory Fields"));
$tpl->set("s", "ABSCHICKEN", mi18n("Send"));
$tpl->set("s", "LOESCHEN", mi18n("Delete"));
$tpl->generate($cfgClient[$client]["path"]["frontend"]."templates/kontaktformular.html");
echo '</form>';
} elseif ($_POST['send'] == 1) {
#Form has been sent
#Check user input
$noerrors = true;
$msg = '';
if ($_POST['Vorname'] == '') {
$noerrors = false;
$msg .= mi18n("Please enter your first name!")."<br/>";
}
if ($_POST['Nachname'] == '') {
$noerrors = false;
$msg .= mi18n("Please enter your name!")."'<br/>";
}
if ($_POST['EMail'] == '') {
$noerrors = false;
$msg .= mi18n("Please enter your e-mail!")."<br/>";
}
if ($_POST['Strasse'] == '') {
$noerrors = false;
$msg .= mi18n("Please enter your street!")."<br/>";
}
if ($_POST['PLZOrt'] == '') {
$noerrors = false;
$msg .= mi18n("Please enter your city!")."<br/>";
}
if ($noerrors == false) {
#Errors have been found
echo mi18n("When dispatching the following errors arose:")."<br/>";
echo $msg.'<br/>';
echo '<a href="javascript:history.back();">'.mi18n("Back").'</a>';
} else {
#No errors, create and send mail
$mail = new phpmailer;
$mail_body = '<html><head></head><body bgcolor="#ffffff"><table cellspacing="0" cellpadding="2" border="0">';
if (is_array($_POST)) {
foreach ($_POST as $key => $value) {
if ($key != 'send') {
$mail_body .= "<tr><td>$key</td><td>$value</td></tr>";
}
}
}
$mail_body .= '</table></bo'.'dy></html>';
$mail->Host = "localhost";
$mail->IsHTML(true);
#Get mailer from settings
switch (strtolower("CMS_VALUE[4]")) {
case "smtp" :
$mail->IsSMTP();
$host = "CMS_VALUE[5]";
$user = "CMS_VALUE[6]";
$password = "CMS_VALUE[7]";
if (($host != '') && ($user != '') && ($password != '')) {
$mail-> $SMTPAuth = true;
$mail->Host = $host;
$mail->Username = $user;
$mail->Password = $password;
}
break;
case "mail" :
$mail->IsMail();
break;
case "sendmail" :
$mail->IsSendmail();
break;
case "qmail" :
$mail->IsQmail();
break;
default :
}
$mail->From = "CMS_VALUE[0]";
$mail->FromName = "CMS_VALUE[2]";
$mail->AddAddress("CMS_VALUE[1]", "");
$mail->Subject = "CMS_VALUE[3]";
$mail->Body = $mail_body;
$mail->WordWrap = 50;
$mail->Send();
#Display message after mail is sent
echo mi18n("Thank you. We recieved your message.")."<br/>";
}
}
?>
Verfasst: Mi 7. Mär 2007, 17:54
von wosch
Verfasst: Do 8. Mär 2007, 09:29
von Snuppel007
OK..., Super!
Das man auf die Einfachsten Lösungen nie selber kommt ..., Danke Wosch, Dein Link hat mir sehr geholfen.
Dann noch einen schönen Tag zusammen,
Snuppel