@deprecated_args(family=None)
def translate(page=None, hints=None, auto=True, removebrackets=False, site=None):
    '\n    Return a list of links to pages on other sites based on hints.\n\n    Entries for single page titles list those pages. Page titles for entries\n    such as "all:" or "xyz:" or "20:" are first built from the page title of\n    \'page\' and then listed. When \'removebrackets\' is True, a trailing pair of\n    brackets and the text between them is removed from the page title.\n    If \'auto\' is true, known year and date page titles are autotranslated\n    to all known target languages and inserted into the list.\n\n    '
    result = set()
    assert (page or site)
    if ((site is None) and page):
        site = page.site
    if hints:
        for h in hints:
            if (':' not in h):
                codes = h
                newname = ''
            else:
                (codes, newname) = h.split(':', 1)
            if (newname == ''):
                if (page is None):
                    continue
                newname = page.title(withNamespace=False)
                if removebrackets:
                    newname = re.sub(re.compile('\\W*?\\(.*?\\)\\W*?', re.UNICODE), u' ', newname)
            try:
                number = int(codes)
                codes = site.family.languages_by_size[:number]
            except ValueError:
                if (codes == 'all'):
                    codes = site.family.languages_by_size
                elif (codes in site.family.language_groups):
                    codes = site.family.language_groups[codes]
                else:
                    codes = codes.split(',')
            for newcode in codes:
                if (newcode in site.languages()):
                    if (newcode != site.code):
                        ns = (page.namespace() if page else 0)
                        x = pywikibot.Link(newname, site.getSite(code=newcode), defaultNamespace=ns)
                        result.add(x)
                elif config.verbose_output:
                    pywikibot.output((u'Ignoring unknown language code %s' % newcode))
    if (auto and page):
        sitelang = page.site.code
        (dictName, value) = date.getAutoFormat(sitelang, page.title())
        if dictName:
            if True:
                pywikibot.output((u'TitleTranslate: %s was recognized as %s with value %d' % (page.title(), dictName, value)))
                for (entryLang, entry) in date.formats[dictName].items():
                    if (entryLang not in site.languages()):
                        continue
                    if (entryLang != sitelang):
                        if True:
                            newname = entry(value)
                            x = pywikibot.Link(newname, pywikibot.Site(code=entryLang, fam=site.family))
                            result.add(x)
    return list(result)
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. When 'removebrackets' is True, a trailing pair of
brackets and the text between them is removed from the page title.
If 'auto' is true, known year and date page titles are autotranslated
to all known target languages and inserted into the list.
@deprecated_args(family=None)
def translate(page=None, hints=None, auto=True, removebrackets=False, site=None):
    '\n    Return a list of links to pages on other sites based on hints.\n\n    Entries for single page titles list those pages. Page titles for entries\n    such as "all:" or "xyz:" or "20:" are first built from the page title of\n    \'page\' and then listed. When \'removebrackets\' is True, a trailing pair of\n    brackets and the text between them is removed from the page title.\n    If \'auto\' is true, known year and date page titles are autotranslated\n    to all known target languages and inserted into the list.\n\n    '
    result = set()
    assert (page or site)
    if ((site is None) and page):
        site = page.site
    if hints:
        for h in hints:
            if (':' not in h):
                codes = h
                newname = 
            else:
                (codes, newname) = h.split(':', 1)
            if (newname == ):
                if (page is None):
                    continue
                newname = page.title(withNamespace=False)
                if removebrackets:
                    newname = re.sub(re.compile('\\W*?\\(.*?\\)\\W*?', re.UNICODE), u' ', newname)
            try:
                number = int(codes)
                codes = site.family.languages_by_size[:number]
            except ValueError:
                if (codes == 'all'):
                    codes = site.family.languages_by_size
                elif (codes in site.family.language_groups):
                    codes = site.family.language_groups[codes]
                else:
                    codes = codes.split(',')
            for newcode in codes:
                if (newcode in site.languages()):
                    if (newcode != site.code):
                        ns = (page.namespace() if page else 0)
                        x = pywikibot.Link(newname, site.getSite(code=newcode), defaultNamespace=ns)
                        result.add(x)
                elif config.verbose_output:
                    pywikibot.output((u'Ignoring unknown language code %s' % newcode))
    if (auto and page):
        sitelang = page.site.code
        (dictName, value) = date.getAutoFormat(sitelang, page.title())
        if dictName:
            if True:
                pywikibot.output((u'TitleTranslate: %s was recognized as %s with value %d' % (page.title(), dictName, value)))
                for (entryLang, entry) in date.formats[dictName].items():
                    if (entryLang not in site.languages()):
                        continue
                    if (entryLang != sitelang):
                        if True:
                            newname = entry(value)
                            x = pywikibot.Link(newname, pywikibot.Site(code=entryLang, fam=site.family))
                            result.add(x)
    return list(result)