Gspell.Language

Fields

None

Methods

class

get_available ()

class

get_default ()

class

lookup (language_code)

compare (language_b)

copy ()

free ()

get_code ()

get_name ()

Details

class Gspell.Language
classmethod get_available()
Returns:

the list of available languages, sorted with Gspell.Language.compare().

Return type:

[Gspell.Language]

classmethod get_default()
Returns:

the default Gspell.Language, or None if no dictionaries are available.

Return type:

Gspell.Language or None

Finds the best available language based on the current locale.

classmethod lookup(language_code)
Parameters:

language_code (str) – a language code.

Returns:

a Gspell.Language corresponding to language_code, or None if not found.

Return type:

Gspell.Language or None

compare(language_b)
Parameters:

language_b (Gspell.Language) – another Gspell.Language.

Returns:

an integer less than, equal to, or greater than zero, if self is <, == or > than language_b.

Return type:

int

Compares alphabetically two languages by their name, as returned by Gspell.Language.get_name().

copy()
Returns:

a copy of lang.

Return type:

Gspell.Language

Used by language bindings.

free()

Used by language bindings.

get_code()
Returns:

the self code, for example fr_BE.

Return type:

str

get_name()
Returns:

the self name.

Return type:

str

Returns the self name translated to the current locale. For example “French (Belgium)” is returned if the current locale is in English and the self code is fr_BE.