org.gnome.sourceview

## Class LanguageManager

- Object
- - org.freedesktop.bindings.Pointer
  - - org.freedesktop.bindings.Proxy
    - - org.gnome.glib.Object
      - - org.gnome.sourceview.LanguageManager

-     public class LanguageManager
      extends Object

  A LanguageManager is used to obtain Language objects that are used for syntax highlighting in a SourceBuffer.

  You need to use `LangagueManager.getDefault()` to get the singleton and then use it to request a Language by "id" via it's `getLanguage()` method.

  Since:
    4.0.12
  Author:
    Stefan Schweizer

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static LanguageManager` | `getDefault()` Return the default LanguageManager.
    `Language` | `getLanguage(String id)` Return a Language specified by its language ID or `null` if the ID is not known.
    `Language` | `getLanguageGuess(String fileName, String contentType)` Get a language based on the filename and content type.

    - ### Methods inherited from class org.freedesktop.bindings.Pointer

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getDefault

          public static LanguageManager getDefault()

      Return the default LanguageManager.
      Since:
        4.0.12

    - #### getLanguage

          public Language getLanguage(String id)

      Return a Language specified by its language ID or `null` if the ID is not known.
      Since:
        4.0.12

    - #### getLanguageGuess

          public Language getLanguageGuess(String fileName,
                                  String contentType)

      Get a language based on the filename and content type. This is only a guess and could be wrong. When it is unable to guess the language it will return null.
      Since:
        4.1.3