titletranslate
— Interwiki Title Translator#
Title translate module.
- titletranslate.translate(page=None, hints=None, auto=True, removebrackets=False, site=None)[source]#
Return a list of links to pages on other sites based on hints.
Entries for single page titles list those pages. Page titles for entries such as “all:” or “xyz:” or “20:” are first built from the page title of ‘page’ and then listed.
Changed in version 9.6: Raise
RuntimeError
instead ofAssertionError
if neither page nor site parameter is given.- Parameters:
auto (bool) – If true, known year and date page titles are autotranslated to all known target languages and inserted into the list.
removebrackets (bool) – If True, a trailing pair of brackets and the text between them is removed from the page title.
hints (list[str] | None)
- Raises:
RuntimeError – Either page or site parameter must be given.
- Return type:
list[Link]