gtksourceview2.LanguageManager

Languages Manager object for gtksourceview2.View

## Synopsis

        gtksourceview2.LanguageManager
        gobject.GObject

          gtksourceview2.LanguageManager

          get_language
          id

          get_language_ids

          get_search_path

          guess_language
          filenameNone
          content_typeNone

          set_search_path

    Functions

    gtksourceview2.language_manager_get_default

## Ancestry

    +-- gobject.GObject
        +-- gtksourceview2.LanguageManager

## Properties

> "language-ids" | Read | List of the ids of the available languages.
> "search-path" | Read-Write | List of directories where the language specification files (.lang) are located.

## Description

Interface to manage available and custom source code language descriptions.

## Constructor

        gtksourceview2.LanguageManager

Returns :

- a new `gtksourceview2.LanguageManager`.

Creates a new `gtksourceview2.LanguageManager` object.

## Methods

### gtksourceview2.LanguageManager.get_language

        get_language
        id

id :

- an ID.

Returns :

- a `gtksourceview2.Language`, or `None` if there is no language identified by the given id.

The `get_language`() method gets the `gtksourceview2.Language` identified by the given id in the language manager.

### gtksourceview2.LanguageManager.get_language_ids

        get_language_ids

Returns :

- a list containing the ids of the available languages or `None` if no language is available.

The `get_language_ids`() method returns the ids of the available languages.

### gtksourceview2.LanguageManager.get_search_path

        get_search_path

Returns :

- a list of language files directories (as string).

The `get_search_path`() method gets the list directories where @lm looks for language files.

### gtksourceview2.LanguageManager.guess_language

        guess_language
        filenameNone
        content_typeNone

filename :

- a filename in Glib filename encoding, or `None`.

content_type :

- a content type (as in GIO API), or `None`.

Returns :

- a `gtksourceview2.Language` or `None` if there is no suitable language for given filename and/or content_type.

The `set_search_path`() method sets the list of directories where the lm looks for language files. If dirs is `None`, the search path is reset to default.

### gtksourceview2.LanguageManager.set_search_path

        set_search_path
        dirs

dirs :

- a list of dirs (as string).

The `set_search_path`() method sets the list of directories where the lm looks for language files. If dirs is `None`, the search path is reset to default.

## Functions

### gtksourceview2.language_manager_get_default

      	  gtksourceview2.language_manager_get_default

Returns :

- a `gtksourceview2.LanguageManager`.

The `language_manager_get_default`() function Returns the default `gtksourceview2.LanguageManager` instance.