code: def attach_translated_content(self, local_main_lang_page,
                                    content, locale):
          '''
          Wrapper for  attach_page
  
          Creates the content
          Then attaches a language relation from the main language page to the
          newly created Page
          Note: we get the parent from the main language page
          '''
          try:
              page = self.attach_page(
                  local_main_lang_page.get_parent(),
                  content)
          except:
              # TODO: log this
              return None
  
          try:
              # create the translation object for page
              language = SiteLanguageRelation.objects.get(
                  language_setting=self.language_setting,
                  locale=locale)
              page.language = language
              page.translated_pages.add(local_main_lang_page)
              local_main_lang_page.translated_pages.add(page)
              page.save()
              local_main_lang_page.save()
          except:
              # TODO: log that creating translation failed
              # TODO: log that page is now being deleted
              page.delete()
          return pagf attach_translated_content(self, local_main_lang_page,
                                    content, locale):
          '''
          Wrapper for  attach_page
  
          Creates the content
          Then attaches a language relation from the main language page to the
          newly created Page
          Note: we get the parent from the main language page
          '''
          try:
              page = self.attach_page(
                  local_main_lang_page.get_parent(),
                  content)
          except:
              # TODO: log this
              return None
  
          try:
              # create the translation object for page
              language = SiteLanguageRelation.objects.get(
                  language_setting=self.language_setting,
                  locale=locale)
              page.language = language
              page.translated_pages.add(local_main_lang_page)
              local_main_lang_page.translated_pages.add(page)
              page.save()
              local_main_lang_page.save()
          except:
              # TODO: log that creating translation failed
              # TODO: log that page is now being deleted
              page.delete()
          return page
docs: Wrapper for  attach_page
  
          Creates the content
          Then attaches a language relation from the main language page to the
          newly created Page
          Note: we get the parent from the main language page