## GspellLanguage

GspellLanguage — Language

## Functions

const GList * | gspell_language_get_available ()
const GspellLanguage * | gspell_language_get_default ()
const GspellLanguage * | gspell_language_lookup ()
const gchar * | gspell_language_get_code ()
const gchar * | gspell_language_get_name ()
gint | gspell_language_compare ()
GspellLanguage * | gspell_language_copy ()
void | gspell_language_free ()

## Types and Values

| GspellLanguage

## Object Hierarchy

        GBoxed
        ╰── GspellLanguage

## Includes

    #include <gspell/gspell.h>

## Description

GspellLanguage represents a language that can be used for the spell checking, i.e. a language for which a dictionary is installed.

## Functions

### gspell_language_get_available ()

    const GList *
    gspell_language_get_available (void);

#### Returns

the list of available languages, sorted with `gspell_language_compare()`.

[transfer none][element-type GspellLanguage]

### gspell_language_get_default ()

    const GspellLanguage *
    gspell_language_get_default (void);

Finds the best available language based on the current locale.

#### Returns

the default GspellLanguage, or `NULL` if no dictionaries are available.

[nullable]

### gspell_language_lookup ()

    const GspellLanguage *
    gspell_language_lookup (const gchar *language_code);

#### Parameters

language_code | a language code. |

#### Returns

a GspellLanguage corresponding to `language_code` , or `NULL` if not found.

[nullable]

### gspell_language_get_code ()

    const gchar *
    gspell_language_get_code (const GspellLanguage *language);

#### Parameters

language | a GspellLanguage. |

#### Returns

the `language` code, for example fr_BE.

### gspell_language_get_name ()

    const gchar *
    gspell_language_get_name (const GspellLanguage *language);

Returns the `language` name translated to the current locale. For example "French (Belgium)" is returned if the current locale is in English and the `language` code is fr_BE.

#### Parameters

language | a GspellLanguage. |

#### Returns

the `language` name.

### gspell_language_compare ()

    gint
    gspell_language_compare (const GspellLanguage *language_a,
                             const GspellLanguage *language_b);

Compares alphabetically two languages by their name, as returned by `gspell_language_get_name()`.

#### Parameters

language_a | a GspellLanguage. |
language_b | another GspellLanguage. |

#### Returns

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

### gspell_language_copy ()

    GspellLanguage *
    gspell_language_copy (const GspellLanguage *language);

Used by language bindings.

#### Parameters

language | a GspellLanguage. |

#### Returns

a copy of `lang` .

### gspell_language_free ()

    void
    gspell_language_free (GspellLanguage *language);

Used by language bindings.

#### Parameters

language | a GspellLanguage. |

## Types and Values

### GspellLanguage

    typedef struct _GspellLanguage GspellLanguage;

## See Also

GspellChecker