| liblangtag Documentation | ||||
|---|---|---|---|---|
| Top | Description | ||||
gchar * lt_tag_canonicalize (lt_tag_t *tag,GError **error); void lt_tag_clear (lt_tag_t *tag); gboolean lt_tag_compare (const lt_tag_t *v1,const lt_tag_t *v2); gchar * lt_tag_convert_to_locale (lt_tag_t *tag,GError **error); lt_tag_t * lt_tag_copy (const lt_tag_t *tag); void lt_tag_dump (const lt_tag_t *tag); const lt_extension_t * lt_tag_get_extension (const lt_tag_t *tag); const lt_extlang_t * lt_tag_get_extlang (const lt_tag_t *tag); const lt_grandfathered_t * lt_tag_get_grandfathered (const lt_tag_t *tag); const lt_lang_t * lt_tag_get_language (const lt_tag_t *tag); const GString * lt_tag_get_privateuse (const lt_tag_t *tag); const lt_region_t * lt_tag_get_region (const lt_tag_t *tag); const lt_script_t * lt_tag_get_script (const lt_tag_t *tag); const gchar * lt_tag_get_string (lt_tag_t *tag); const GList * lt_tag_get_variants (const lt_tag_t *tag); gchar * lt_tag_lookup (const lt_tag_t *tag,const gchar *pattern,GError **error); gboolean lt_tag_match (const lt_tag_t *v1,const gchar *v2,GError **error); lt_tag_t * lt_tag_new (void); gboolean lt_tag_parse (lt_tag_t *tag,const gchar *tag_string,GError **error); lt_tag_t * lt_tag_ref (lt_tag_t *tag); lt_tag_t; gboolean lt_tag_truncate (lt_tag_t *tag,GError **error); void lt_tag_unref (lt_tag_t *tag);
gchar * lt_tag_canonicalize (lt_tag_t *tag,GError **error);
Canonicalize the language tag according to various information of subtags.
void lt_tag_clear (lt_tag_t *tag);
(Re-)Initialize all of the subtag information stored in tag.
|
a lt_tag_t. |
gboolean lt_tag_compare (const lt_tag_t *v1,const lt_tag_t *v2);
Compare if v1 and v2 is the same object or not.
gchar * lt_tag_convert_to_locale (lt_tag_t *tag,GError **error);
Convert the language tag to the locale.
void lt_tag_dump (const lt_tag_t *tag);
Dumps the container information to the standard output.
|
a lt_tag_t. |
const lt_extension_t * lt_tag_get_extension (const lt_tag_t *tag);
Obtain a lt_extension_t instance in tag.
|
a lt_tag_t. |
Returns : |
a lt_extension_t. [transfer none] |
const lt_extlang_t * lt_tag_get_extlang (const lt_tag_t *tag);
Obtain a lt_extlang_t instance in tag.
|
a lt_tag_t. |
Returns : |
a lt_extlang_t. [transfer none] |
const lt_grandfathered_t * lt_tag_get_grandfathered (const lt_tag_t *tag);
Obtain a lt_grandfathered_t instance in tag.
|
a lt_tag_t. |
Returns : |
a lt_grandfathered_t. [transfer none] |
const lt_lang_t * lt_tag_get_language (const lt_tag_t *tag);
Obtain a lt_lang_t instance in tag.
const GString * lt_tag_get_privateuse (const lt_tag_t *tag);
Obtain a GString instance in tag.
const lt_region_t * lt_tag_get_region (const lt_tag_t *tag);
Obtain a lt_region_t instance in tag.
|
a lt_tag_t. |
Returns : |
a lt_region_t. [transfer none] |
const lt_script_t * lt_tag_get_script (const lt_tag_t *tag);
Obtain a lt_script_t instance in tag.
|
a lt_tag_t. |
Returns : |
a lt_script_t. [transfer none] |
const gchar * lt_tag_get_string (lt_tag_t *tag);
Obtains a language tag in string.
|
a lt_tag_t. |
Returns : |
a language tag string. |
const GList * lt_tag_get_variants (const lt_tag_t *tag);
Obtain a list of lt_variant_t instance in tag.
|
a lt_tag_t. |
Returns : |
a GList containing lt_variant_t. [element-type lt_variant_t][transfer none] |
gchar * lt_tag_lookup (const lt_tag_t *tag,const gchar *pattern,GError **error);
Lookup the language tag that tag meets with pattern.
Any of subtags in pattern is allowed to use the wildcard according to
the syntax in RFC 4647.
gboolean lt_tag_match (const lt_tag_t *v1,const gchar *v2,GError **error);
Try matching of v1 and v2. any of subtags in v2 is allowed to use
the wildcard according to the syntax in RFC 4647.
lt_tag_t * lt_tag_new (void);
Create a new instance of lt_tag_t.
Returns : |
a new instance of lt_tag_t. [transfer full] |
gboolean lt_tag_parse (lt_tag_t *tag,const gchar *tag_string,GError **error);
Parse tag_string and create appropriate instances for subtags.
lt_tag_t * lt_tag_ref (lt_tag_t *tag);
Increases the reference count of tag.
|
a lt_tag_t. |
Returns : |
the same tag object. [transfer none]
|
typedef struct _lt_tag_t lt_tag_t;
All the fields in the lt_tag_t structure are private to the lt_tag_t implementation.
gboolean lt_tag_truncate (lt_tag_t *tag,GError **error);
Truncate the last subtag.