def interlink_translations(content):
 lang = content.lang
 content.translations.sort(key=attrgetter('lang'))
 for translation in content.translations:
  relpath = relpath_to_site(lang, translation.lang)
  url = _NATIVE_CONTENT_URL_DB[translation.source_path]
  translation.override_url = posixpath.join(relpath, url)

def interlink_translations ( content ) : lang = content . lang content . translations . sort ( key = attrgetter ( 'lang' ) ) for translation in content . translations : relpath = relpath_to_site ( lang , translation . lang ) url = _NATIVE_CONTENT_URL_DB [ translation . source_path ] translation . override_url = posixpath . join ( relpath , url )
link content to translations in their main language so the url of the different subsites will be honored .