Hi, does someone has an idea how to add on (INPUT) modules multilanguage?
Here an example:
At the end there is "Angezeigte Länge in Zeichen" that is in german, how can I put multilangue to these kind of sentences?
Thanks
Alessandro
[code]
/**
* Artikelliste mit I1,H1,T1
*
* Erstellt eine Liste mit allen Artikel bis
* auf den Startartikel.
*
* INPUT
*
* Author Jan Lengowski
* Copyright four for business AG
*/
// selected category
$selected = "CMS_VALUE[0]";
echo "<table cellspacing=\"0\" cellpadding=\"10\" border=\"0\">
<tr valign=\"top\">
<td>Kategorie wählen:</td>
<td>
<select name=\"CMS_VAR[0]\">";
if($selected!="0" && $selected!=""){
echo"<option value=\"0\">--- kein ---</option>";
}else{
echo"<option selected=\"selected\" value=\"0\">--- kein ---</option>";
}
// fetch all categorys
$query = "SELECT A.idcat, A.level, C.name FROM ".$cfg["tab"]["cat_tree"]." AS A, ".
$cfg["tab"]["cat"]." AS B, ".$cfg["tab"]["cat_lang"]." AS C WHERE A.idcat=B.idcat ".
"AND B.idcat=C.idcat AND C.idlang='$lang' AND B.idclient='$client' ".
"AND C.visible=1 ORDER BY A.idtree";
// execute query
$db->query($query);
// loop result and build the options
while ($db->next_record()) {
// indent spacer
$spaces = "|";
// how many levels
$levels = $db->f("level");
for ($i = 0; $i < $levels; $i ++) {
// add 2 spaces for every level
$spaces = $spaces . "--";
} // end for
$spaces .= ">";
if ($selected == $db->f("idcat")) {
// selected category
echo "<option selected=\"selected\" value=\"". $db->f("idcat") ."\">". $spaces . $db->f("name") ."</option>";
} else {
// category
echo "<option value=\"". $db->f("idcat") ."\">". $spaces . $db->f("name") ."</option>";
} // end if
} // end while
echo " </select>";
echo " </td>
</tr>
<tr>
<td>Überschrift</td>
<td><input type=\"text\" name=\"CMS_VAR[2]\" value=\"CMS_VALUE[2]\"></td>
</tr>
<tr>
<td>Angezeigte Länge in Zeichen</td>
<td><input type=\"text\" name=\"CMS_VAR[3]\" value=\"CMS_VALUE[3]\"></td>
</tr>
</table>";
[/code]
Multilanguage for (INPUT) Modules
-
- Beiträge: 53
- Registriert: Fr 14. Nov 2003, 10:08
- Wohnort: Switzerland
- Kontaktdaten:
Multilanguage for (INPUT) Modules
Alessandro Marrarosa
Dipl. Wirtschaftsinformatiker HF
The Swiss Post
Information Technology Services
CH-6501 Bellinzona
Dipl. Wirtschaftsinformatiker HF
The Swiss Post
Information Technology Services
CH-6501 Bellinzona
-
- Beiträge: 53
- Registriert: Fr 14. Nov 2003, 10:08
- Wohnort: Switzerland
- Kontaktdaten:
-
- Beiträge: 53
- Registriert: Fr 14. Nov 2003, 10:08
- Wohnort: Switzerland
- Kontaktdaten:
Hi timo,
could you check here and told me if was what you where saying using i18n?
I also creted in the "contenido.po" file the rights texts.
I now that if I have to upgrade contenido I have to pay attention to these file (right?:-)).
Bye
Alessandro
[code]/***********************************************
* CONTENIDO MODUL - INPUT
*
* Modulname : Mailkontakt
* Author : agon
* Copyright : Contenido - four for business
* Created : 05-11-2003
* Modified : 05-11-2003
************************************************/
echo "<table cellspacing=\"0\" cellpadding=\"10\" border=\"0\">
<tr>
<td>i18n(\"Addressee name\"):</td>
<td><input type=\"text\" name=\"CMS_VAR[8]\" value=\"CMS_VALUE[8]\" size=70></td>
</tr>
<tr>
<td>i18n(\"Addressee email\"):</td>
<td><input type=\"text\" name=\"CMS_VAR[9]\" value=\"CMS_VALUE[9]\" size=70></td>
</tr>
<tr>
<td colspan=2>i18n(\"Note in the two input fields a same number of addressees and email addresses; separate the entries in each case with commas\").</td>
</tr>
</table>";[/code]
could you check here and told me if was what you where saying using i18n?
I also creted in the "contenido.po" file the rights texts.
I now that if I have to upgrade contenido I have to pay attention to these file (right?:-)).
Bye
Alessandro
[code]/***********************************************
* CONTENIDO MODUL - INPUT
*
* Modulname : Mailkontakt
* Author : agon
* Copyright : Contenido - four for business
* Created : 05-11-2003
* Modified : 05-11-2003
************************************************/
echo "<table cellspacing=\"0\" cellpadding=\"10\" border=\"0\">
<tr>
<td>i18n(\"Addressee name\"):</td>
<td><input type=\"text\" name=\"CMS_VAR[8]\" value=\"CMS_VALUE[8]\" size=70></td>
</tr>
<tr>
<td>i18n(\"Addressee email\"):</td>
<td><input type=\"text\" name=\"CMS_VAR[9]\" value=\"CMS_VALUE[9]\" size=70></td>
</tr>
<tr>
<td colspan=2>i18n(\"Note in the two input fields a same number of addressees and email addresses; separate the entries in each case with commas\").</td>
</tr>
</table>";[/code]
Alessandro Marrarosa
Dipl. Wirtschaftsinformatiker HF
The Swiss Post
Information Technology Services
CH-6501 Bellinzona
Dipl. Wirtschaftsinformatiker HF
The Swiss Post
Information Technology Services
CH-6501 Bellinzona
wrong way:
right way:
Code: Alles auswählen
echo "<table cellspacing=\"0\" cellpadding=\"10\" border=\"0\">
<tr>
<td>i18n(\"Addressee name\"):</td> ";
Code: Alles auswählen
echo "<table cellspacing=\"0\" cellpadding=\"10\" border=\"0\">
<tr>
<td>".i18n("Addressee name").":</td>";
-
- Beiträge: 53
- Registriert: Fr 14. Nov 2003, 10:08
- Wohnort: Switzerland
- Kontaktdaten: