$lang['Submit_quiz']

All web design discussion, including Ultimate Quiz MOD support.

Moderator: CricketMX Forum Moderators

Post Reply
ABTOP
Greenhorn
Greenhorn
Posts: 24
Joined: Tue Jul 24, 2007 7:49 pm
Contact:

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.
ABTOP
Greenhorn
Greenhorn
Posts: 24
Joined: Tue Jul 24, 2007 7:49 pm
Contact:

In quiz.php find

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']));
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';
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

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?
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)
ABTOP
Greenhorn
Greenhorn
Posts: 24
Joined: Tue Jul 24, 2007 7:49 pm
Contact:

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?
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".

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.
User avatar
kikkotm
Know-It-All
Know-It-All
Posts: 186
Joined: Fri Nov 09, 2007 12:16 am
Location: ROMA CAPUT MUNDI - Italy

yeah..for Italian Lenguage is very Good..

Our Submit Quiz is: INSERISCI UN QUIZ
but is very different from: INVIA LE RISPOSTE (Submit Answers)

THANKS
ImageImage Wine is an enemy of the man... Who escapes in front of the enemy is an ignoble man!!! ImageImage
Image Image
Image Image
Image Image
Image Image
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

ABTOP wrote:
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?
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".

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.

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']));
REPLACE WITH

Code: Select all

"L_SUBMIT" => $lang['Submit'])); 
And you could do this in several places. Wherever it says "Submit Quiz", you can make it $lang['Submit'] - which is simply "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)
Post Reply