docs: def get_flatpages_i18n(parser, token):
      """
      Retrieves all flatpage objects available for the current site and
      visible to the specific user (or visible to all users if no user is
      specified). Populates the template context with them in a variable
      whose name is defined by the ``as`` clause.
  
      An optional ``for`` clause can be used to control the user whose
      permissions are to be used in determining which flatpages are visible.
  
      An optional argument, ``starts_with``, can be applied to limit the
      returned flatpages to those beginning with a particular base URL.
      This argument can be passed as a variable or a string, as it resolves
      from the template context.
  
      Syntax::
  
          {% get_flatpages_i18n ['url_starts_with'] [for user] as context_name %}
  
      Example usage::
  
          {% get_flatpages_i18n as flatpages %}
          {% get_flatpages_i18n for someuser as flatpages %}
          {% get_flatpages_i18n '/about/' as about_pages %}
          {% get_flatpages_i18n prefix as about_pages %}
          {% get_flatpages_i18n '/about/' for someuser as about_pages %}
          {% get_flatpages_i18n containing '/en/' as my_pages %}
          {% get_flatpages_i18n excluding '/en/' as my_pages %}
      """
      bits = token.split_contents()
      syntax_message = ("%(tag_name)s expects a syntax of %(tag_name)s "
                        "['url_starts_with'] [for user] as context_name" %
                        dict(tag_name=bits[0]))
  
      # Must have at 3-6 bits in the tag
      if 3 <= len(bits) <= 8:
          containing = None
          excluding = None
  
          # If there's an even number of bits, there's no prefix
          if len(bits) % 2 == 0:
              prefix = bits[1]
          else:
              prefix = None
          if bits[1] == "containing":
              containing = bits[2]
          else:
              if bits[1] == "excluding":
                  excluding = bits[2]
  
          # The very last bit must be the context name
          if bits[-2] != 'as':
              raise template.TemplateSyntaxError(syntax_message)
          context_name = bits[-1]
  
          # If there are 5 or 6 bits, there is a user defined
          if len(bits) >= 5:
              if bits[-4] != 'for':
                  raise template.TemplateSyntaxError(syntax_message)
              user = bits[-3]
          else:
              user = None
  
          return FlatpageNode(
              context_name, starts_with=prefix, contains=containing,
              excludes=excluding, user=user)
      else:
          raise template.TemplateSyntaxError(syntax_message)