Topic: wrong order of the error messages (Read 893 times)
Total Zero
Gender:
Posts: 5
38 credits Members referred : 0
« on: Jun 08, 2006, 11:27:11 PM »
i've translated the msg's to polish (thx olaf for appreciate it) and if I set the language to pl the error mesages are in wrong order - the $msg[0] = "Please correct the following error(s):"; is at the end, what can it be? maybe somebaody have the same problem?
« Last Edit: Jun 09, 2006, 12:12:19 AM by olaf »
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6445
39494 credits Members referred : 374
It's time to use PHP5!
Re: showing the error messages
« Reply #1 on: Jun 08, 2006, 11:34:05 PM »
what is the code you are using together with the form?
Please show us only the php part and do you tried the original example? is there a live version?
EDIT I think I found the problem:
Code:
<?php function create_msg($break_elem = "<br />") { $the_msg = ""; krsort($this->messages); // new in 1.35 reset($this->messages); foreach ($this->messages as $value) { $the_msg .= $value.$break_elem."\n"; } return $the_msg; }
It looks like that asort isn't the right function
about your translations, this text is OK together with iso-8859-2 encoding, is there a possebility to have them working for utf-8 (will say all polish special characters with unicode values)? After the sesond polish website I learned that utf-8 is the best way to handle this characters.
Total Zero
Gender:
Posts: 5
38 credits Members referred : 0
« Reply #4 on: Jun 09, 2006, 12:17:42 AM »
with the new wersion it works perfectly. Thanks!
the utf-8
Code:
case "pl": $msg[0] = "Wystąpiły następujące błędy w formularzu:"; $msg[1] = "Pole <b>".$fieldname."</b> jest puste."; $msg[10] = "Data w polu <b>".$fieldname."</b> nie jest poprawna."; $msg[11] = "Adres e-mail w polu <b>".$fieldname."</b> nie jest poprawny."; $msg[12] = "Wartość w polu <b>".$fieldname."</b> nie jest poprawna."; $msg[13] = "Text w polu <b>".$fieldname."</b> jest za długi."; $msg[14] = "Adres strony w polu <b>".$fieldname."</b> nie jest poprawny."; $msg[15] = "W polu <b>".$fieldname."</b> znaleziono kod HTML, nie jest to dozwolone."; break;
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6445
39494 credits Members referred : 374