Class Polyglossia


  • public class Polyglossia
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Polyglossia()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] applyLanguage​(java.lang.String sLang, java.lang.String sCountry)
      Add the given locale to the list of applied locales and return definitions for applying the language to a text portion:
      java.lang.String[] getDeclarations()
      Get the declarations for the applied languages, in the form
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Polyglossia

        public Polyglossia()
    • Method Detail

      • getDeclarations

        public java.lang.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 java.lang.String[] applyLanguage​(java.lang.String sLang,
                                                java.lang.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