Форум сайта python.su
Всем привет!
Есть вот такой скрипт.
import re import googletrans from googletrans import Translator translator = Translator() eng_file=open("file.txt", "r") line_en=eng_file.readline() while line_en: line_en=re.sub(r'<[^<]+>', "",line_en) result = translator.translate(line_en.strip(),src='en',dest='ru') print(result.text) line_en=eng_file.readline() eng.file.close()
<string name="login_OK">Login successful!</string>
<string name="login_wrong_pin">Wrong PIN!</string>
<string name="login_already_logged">Already logged in on: </string>
<string name="login_code_error">Server error!</string>
<string name="login_licence">Licence problem!</string>
<string name="logout_Selected">Logout selected</string>
<string name="logout_All">Logout all</string>
<string name="submit_all">Submit for all</string>
Офлайн