docstr: Return options for polyglossia's ``\setmainlanguage``.
docstr_tok: ["Return","options","for","polyglossia","'s","``","\\setmainlanguage","``","."]
code: def get_mainlanguage_options(self) -> str | None:
      r"""Return options for polyglossia's ``\setmainlanguage``."""
      if self.use_polyglossia is False:
          return None
      elif self.language == "german":
          language = super().language_name(self.language_code)
          if language == "ngerman":
              return "spelling=new"
          else:
              return "spelling=old"
      else:
          return None
  
file_path: sphinx/sphinx/builders/latex/util.py
imports: from __future__ import annotations
  from docutils.writers.latex2e import Babel
label_desc: Use image node_id 5 for calling the ExtBabel obj's underlying member method code with example usage: obj.get_mainlanguage_options() and returns: None, None, str, str