+def revert_mongolian(document):
+ "Set language Mongolian to English"
+ i = 0
+ if document.language == "mongolian":
+ document.language = "english"
+ i = find_token(document.header, "\\language", 0)
+ if i != -1:
+ document.header[i] = "\\language english"
+ j = 0
+ while True:
+ j = find_token(document.body, "\\lang mongolian", j)
+ if j == -1:
+ return
+ document.body[j] = document.body[j].replace("\\lang mongolian", "\\lang english")
+ j = j + 1
+
+