Class Polyglossia

java.lang.Object
writer2latex.latex.i18n.Polyglossia

public class Polyglossia extends Object
  • Constructor Details

    • Polyglossia

      public Polyglossia()
  • Method Details

    • getDeclarations

      public String[] getDeclarations()

      Get the declarations for the applied languages, in the form

      \\usepackage{polyglossia}

      \\setdefaultlanguage{language1}

      \\setotherlanguage{language2}

      \\setotherlanguage{language3}

      ...

      Returns:
      the declarations as a string array
    • applyLanguage

      public String[] applyLanguage(String sLang, String sCountry)

      Add the given locale to the list of applied locales and return definitions for applying the language to a text portion:

      • A command of the forn \textlanguage[variant=languagevariant]
      • An environment in the form \begin{language}[variant=languagevariant]...\end{language}

      The first applied language is the default language

      Parameters:
      sLang - The language
      sCountry - The country (may be null)
      Returns:
      a string array containing definitions to apply the language: Entry 0 contains a command and Entry 1 and 2 contains an environment