Translation via locale files might be possible, but might require writing a browser view so that you can get access to the message factory machinery.
But if you don't need that you could try simply embedding the translations in the script and testing request.LANGUAGE to determine the response.
if request.LANGUAGE == 'en-us':
return "Try again yank!"
elif REQUEST.LANGUAGE ...