---
name: "Gtk2::SourceView2::LanguageManager"
section: "3pm"
platform: "linux"
package: "libgtk2-sourceview2-perl"
version: "0.10-2+b3"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::SourceView2::LanguageManager"
---

# Gtk2::SourceView2::LanguageManager(3pm)

## NAME

Gtk2::SourceView2::LanguageManager

## HIERARCHY

```
  Glib::Object
  +----Gtk2::SourceView2::LanguageManager
```

## METHODS

### languagemanager = Gtk2::SourceView2::LanguageManager-\>new

### languagemanager = Gtk2::SourceView2::LanguageManager-\>get\_default

### language or undef = $lm-\>guess\_language ($filename, $content\_type=undef)

- •

  `$filename` (string or undef)

- •

  `$content_type` (string or undef)

### language or undef = $lm-\>get\_language ($id)

- •

  `$id` (string)

### list = $lm-\>get\_language\_ids

### list = $lm-\>get\_search\_path

### $lm-\>set\_search\_path (...)

- •

  ... (list)

Sets the list of directories where the lm looks for language files. If no dirs are given (empty list) then the search path is cleared, if `"undef"` is passed then the search path is reset to default.

**Note**: At the moment this function can be called only before the language files are loaded for the first time. In practice to set a custom search path for a Gtk2::SourceLanguageManager, you have to call this function right after creating it.

## PROPERTIES

- 'language-ids' (Glib::Strv : default undef : readable)

  List of the ids of the available languages

- 'search-path' (Glib::Strv : default undef : readable / writable)

  List of directories where the language specification files (.lang) are located

## SEE ALSO

Gtk2::SourceView2, Glib::Object

## COPYRIGHT

Copyright (C) 2009 by Emmanuel Rodriguez
