$lang['Submit_quiz']
Moderator: CricketMX Forum Moderators
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.
In quiz.php find
replace (line 485)
"L_SUBMIT" => $lang['Submit_quiz']));
with
"L_SUBMIT" => $lang['Submit_answers']));
in lang_quiz.ph find:
$lang['Submit_quiz'] = 'Submit Quiz';
after add:
$lang['Submit_answers'] = 'Submit Answers';
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']));
"L_SUBMIT" => $lang['Submit_quiz']));
with
"L_SUBMIT" => $lang['Submit_answers']));
in lang_quiz.ph find:
$lang['Submit_quiz'] = 'Submit Quiz';
after add:
$lang['Submit_answers'] = 'Submit Answers';
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?
Submit Quiz makes sense for both submitting quizzes and answers, I thought it would save time by not adding an extra language variable?
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!
"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
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.
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.
Another thing you could do, to eliminate the need for adding to lang_quiz.php:
FIND (line 485 of quiz.php)
Code: Select all
"L_SUBMIT" => $lang['Submit_quiz']));
Code: Select all
"L_SUBMIT" => $lang['Submit']));
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!
"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)