$lang['Submit_quiz']
Posted: Sun Nov 11, 2007 2:40 am
You are using the same $lang['Submit_quiz'] for creating new quizzes and for answering existing ones. I wish you didn't do that since that creates certain translation difficulties.
Tech discussion, website creation and the world's best OT Forum!
https://forums.cricketmx.com/
Code: Select all
$select_quiz_data = "SELECT * FROM " . QUIZ_TRUE_FALSE_TABLE . " WHERE quiz_id = $quiz_id";
if(!$result_quiz_data = $db->sql_query($select_quiz_data))
{
message_die(GENERAL_ERROR, '', 'Could not obtain advanced quiz data', __LINE__, __FILE__);
}
while($quiz_data = $db->sql_fetchrow($result_quiz_data))
{
$quiz_question = smilies_pass(bbencode_second_pass($quiz_data['quiz_question'], ''));
$quiz_question_id = $quiz_data['question_id'];
$quiz_answer = $quiz_data['quiz_answer'];
$template->assign_vars( array(
"U_QUIZ_NAME" => $quiz_name,
"U_STATISTICS" => "<a href='" . append_sid("quiz_stats.$phpEx?" . POST_QUIZ_URL . "=$quiz_id") . "'>" . $lang['Quiz_stats'] . "</a>",
"F_FORM" => append_sid("quiz.$phpEx?mode=results"),
"F_ID" => $quiz_id,
"F_TYPE" => $quiz_type,
"F_TIME" => time(),
"L_MOD_LANGS" => $mod_langs,
"L_TRUE_FALSE_INFORMATION" => $lang['Quiz_true_false_information'],
"L_TRUE" => $lang['Quiz_answer_true'],
"L_FALSE" => $lang['Quiz_answer_false'],
"L_SUBMIT" => $lang['Submit_quiz']));
Actually, the buttons by themselves wouldn't be a problem. Although I still think there is a logical difference between "Submit ( questions for a new) Quiz" and "Submit Answers (for an existing Quiz)", I could have easily overcome those differences by translating the buttons into something generic like "Send".battye wrote:Thanks for the suggestion. Why is it hard to translate though?
Submit Quiz makes sense for both submitting quizzes and answers, I thought it would save time by not adding an extra language variable?
As far as the PHP goes, that is fine. Looks perfect infact.ABTOP wrote:Actually, the buttons by themselves wouldn't be a problem. Although I still think there is a logical difference between "Submit ( questions for a new) Quiz" and "Submit Answers (for an existing Quiz)", I could have easily overcome those differences by translating the buttons into something generic like "Send".battye wrote:Thanks for the suggestion. Why is it hard to translate though?
Submit Quiz makes sense for both submitting quizzes and answers, I thought it would save time by not adding an extra language variable?
The real problem arises from the third use of this language variable - for the layout link - the invitation to create a new quiz. That link would have to somehow be in imperative and carry the idea of creating something new (a quiz in this case). Those meanings would be very hard to reconcile with both buttons. I could only keep the sense together by finding appropriate translation for the link and the "Submit Quiz" button, but then I needed something different for the "Submit Answers" button.
Since you didn't put forward any technical objections to me adding a new language tag the way I wrote, I understand mine would be a functioning and acceptable way of doing it? I am only double-checking since my knowledge of php is quite limited.
Code: Select all
"L_SUBMIT" => $lang['Submit_quiz']));
Code: Select all
"L_SUBMIT" => $lang['Submit']));