MyBB Community Forums

Full Version: How can I translate string "Re:" in quick reply?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When you make a quick reply, the string "Re:" is appended to the post's subject
I am runing an arabic board, so how can I translate this little string? Blush
It's hardcoded in ./inc/datahandlers/post.php
Thanks
I hard-translate it Big Grin
However, it is still there
I managed to translate it into newreply.php file, so it is working when clicking new reply button
However, it is not working with quickreply mode Huh
Which file did you edit?
Well
In datahandlers/post.php, I translated the foloowing
// If this is the first post there needs to be a subject, else make it the default one.
			if(my_strlen(trim_blank_chrs($subject)) == 0 && $first_post)
			{
				$this->set_error("firstpost_no_subject");
				return false;
			}
			elseif(my_strlen($subject) == 0)
			{
				$thread = get_thread($post['tid']);
				$subject = "RE: ".$thread['subject'];
			}
		}

		// This is a new post
		else if($this->action == "post")
		{
			if(my_strlen(trim_blank_chrs($subject)) == 0)
			{
				$thread = get_thread($post['tid']);
				$subject = "RE: ".$thread['subject'];
			}
		}

In the newreply.php, I translated the following:

			$postbit = build_postbit($post, 1);
			eval("\$preview = \"".$templates->get("previewpost")."\";");
		}
	}
	$subject = htmlspecialchars_uni($subject);

	if(!$pid && !$mybb->input['previewpost'])
	{
		$subject = "RE: " . $thread['subject'];
	}

	// Setup a unique posthash for attachment management
and
				// Only show messages for the current thread
				if($quoted_post['tid'] == $tid || $load_all == 1)
				{
					// If this post was the post for which a quote button was clicked, set the subject
					if($pid == $quoted_post['pid'])
					{
						$subject = preg_replace('#RE:\s?#i', '', $quoted_post['subject']);
						$subject = "RE: ".$subject;
					}
					$message .= parse_quoted_message($quoted_post);
					$quoted_ids[] = $quoted_post['pid'];
				}
Well, the quick reply is Javascript, so i assume its in there. I've looked in the datahandlers too and I cant find any other mentions of "RE:" than the ones you've already changed Confused
Any idea how to transle RE: which is apended to the quickreply?
Go to: Admin Control Panel > Templates > Showthread Templates > showthread_quickreply > and find;

	<input type="hidden" name="subject" value="RE: {$thread['subject']}" />

Change RE: to whatever you would like to translate.
Genuis !!!
Thanks
Solved