Main Page Widgets Namespaces Book

# Pango::Language Class Reference

A Pango::Language is used to represent a language. More...

List of all members.

## Public Methods

| Language (PangoLanguage* castitem, bool make_a_copy=true)
| Language (const Language& src)
Language& | operator= (const Language& src)
| ~Language ()
PangoLanguage* | gobj ()
const PangoLanguage* | gobj () const
PangoLanguage* | gobj_copy () const
| Language ()
| Constructs an empty language tag.
| Language (const Glib::ustring& language)
| Constructs a Pango::Language object from a RFC-3066 format language tag.
Glib::ustring | get_string () const
| Gets a RFC-3066 format string representing the given language tag.
bool | matches (const Glib::ustring& range_list) const
| Checks if a language tag matches one of the elements in a list of language ranges.

## Protected Attributes

PangoLanguage* | gobject_

## Related Functions

(Note that these are not member functions.)
Pango::Language | wrap (PangoLanguage* object, bool take_copy=false)

## Detailed Description

A Pango::Language is used to represent a language.

## Constructor & Destructor Documentation

Pango::Language::Language | ( | PangoLanguage* | castitem,
|  | bool | make_a_copy = true
| ) | `[explicit]`

Pango::Language::Language | ( | const Language& | src | ) |

Pango::Language::~Language | ( |  | ) |

Pango::Language::Language | ( |  | ) |

| Constructs an empty language tag.

Pango::Language::Language | ( | const Glib::ustring& | language | ) |

| Constructs a Pango::Language object from a RFC-3066 format language tag. This function first canonicalizes the string by converting it to lowercase, mapping '_' to '-', and stripping all characters other than letters and '-'.

## Member Function Documentation

Glib::ustring Pango::Language::get_string | ( |  | ) |

Gets a RFC-3066 format string representing the given language tag.

Returns:
  A string representing the language tag. An empty string is returned if the language tag is empty.

const PangoLanguage* Pango::Language::gobj | ( |  | ) | const`[inline]`

PangoLanguage* Pango::Language::gobj | ( |  | ) | `[inline]`

PangoLanguage* Pango::Language::gobj_copy | ( |  | ) |

bool Pango::Language::matches | ( | const Glib::ustring& | range_list | ) | const

Checks if a language tag matches one of the elements in a list of language ranges.

A language tag is considered to match a range in the list if the range is '*', the range is exactly the tag, or the range is a prefix of the tag, and the character after the tag is '-'.

Parameters:

  range_list | A list of language ranges, separated by ';' characters. each element must either be '*', or a RFC 3066 language range canonicalized as by pango_language_from_string().

Returns:
  `true` if a match was found.

Language& Pango::Language::operator= | ( | const Language& | src | ) |

## Friends And Related Function Documentation

Pango::Language wrap | ( | PangoLanguage* | object,
|  | bool | take_copy = false
| ) | `[related]`

## Member Data Documentation

PangoLanguage* Pango::Language::gobject_`[protected]`

The documentation for this class was generated from the following file:

- language.h