translate/templates/homepage.html (21 lines of code) (raw):
<h1>Google Cloud Platform - Translate Sample</h1>
<p>This Python Flask application demonstrates App Engine Standard and the Translate API</p>
<br>
<html>
<body>
<form action="run_translate" method="POST" enctype="multipart/form-data">
Translate: <input type="text" name="text"><br>
<input type="submit" name="submit" value="Submit">
</form>
{% if confidence %}
<h2>Language Detection:</h2>
<p><b>Confidence:</b> {{ confidence }}</p>
<p><b>Input Text:</b> {{ input_text|safe }}</p>
<p><b>Language:</b> {{ language }}</p>
<br>
<h2>Translated Text:</h2>
<p><b>French Translation:</b> {{ translated_text_french|safe }} </p>
<p><b>Chinese Translation:</b> {{ translated_text_chinese|safe }} </p>
{% endif %}
</body>
</html>