Habe das Kontaktmodul zweisprachig verwendet. Klappt auch recht gut.
Bei einer Länderliste habe ich allerdings das Problem der alphabetischen Sortierung. Ägypten kommt z. B. unter A im Englischen Egypt bleibt dann allerdings an gleicher Stelle.
Hat jemand eine Idee, wie ich die englische Länderliste alphabetisch sortieren kann?
Zu sehen unter:
http://www.webec.de/front_content.php?idcat=7&lang=1
bzw.
http://www.webec.de/front_content.php?idcat=7&lang=2
Vielen Dank
Gruß Mc
Standardkontaktmodul in der 4.6.15 zweisprachig
Danke für deinen Hinweis. Ich habe das Problem jetzt so gelöst:
Im Kontaktmodul:
Im template:
Gruß Mc
Im Kontaktmodul:
Code: Alles auswählen
if ($lang==2) {
$countries = array("Germany", "Egypt", "Algeria", "Andorra");
asort ($countries);
}
else {
$countries = array("Deutschland", "Ägypten", "Algerien", "Andorra");
asort ($countries);
}
foreach ($countries as $key => $val) {
$tpl->set("d", "LAENDER", $val);
$tpl->next();
}
Im template:
Code: Alles auswählen
<select name="LAND" size="1">
<!-- BEGIN:BLOCK -->
<option>{LAENDER}</option>
<!-- END:BLOCK -->
</select>