Container - Extlang

Container - Extlang — A container class for Extlang subtag

Functions

Types and Values

Description

This container class provides a data access to Extlang subtag entry.

Functions

lt_extlang_ref ()

lt_extlang_t *
lt_extlang_ref (lt_extlang_t *extlang);

Increases the reference count of extlang .

Parameters

extlang

a lt_extlang_t.

 

Returns

the same extlang object.

[transfer none]


lt_extlang_unref ()

void
lt_extlang_unref (lt_extlang_t *extlang);

Decreases the reference count of extlang . when its reference count drops to 0, the object is finalized (i.e. its memory is freed).

Parameters

extlang

a lt_extlang_t.

 

lt_extlang_get_tag ()

const char *
lt_extlang_get_tag (const lt_extlang_t *extlang);

Obtains the subtag that is registered as ISO 639 code.

Parameters

extlang

a lt_extlang_t.

 

Returns

a subtag name.


lt_extlang_get_preferred_tag ()

const char *
lt_extlang_get_preferred_tag (const lt_extlang_t *extlang);

Obtains the preferred-value. this is available only when the subtag is marked as deprecated.

Parameters

extlang

a lt_extlang_t.

 

Returns

a preferred-value for the subtag or NULL.


lt_extlang_get_name ()

const char *
lt_extlang_get_name (const lt_extlang_t *extlang);

Obtains the description of the subtag.

Parameters

extlang

a lt_extlang_t.

 

Returns

a description string.


lt_extlang_get_macro_language ()

const char *
lt_extlang_get_macro_language (const lt_extlang_t *extlang);

Obtains the macrolanguage being assigned for the subtag. This is available only when the subtag is registered as the macrolanguage in ISO 639-3.

Parameters

extlang

a lt_extlang_t.

 

Returns

a macrolanguage string or NULL.


lt_extlang_get_prefix ()

const char *
lt_extlang_get_prefix (const lt_extlang_t *extlang);

Obtains the prefix being assigned to the subtag. This is available only when the subtag has a particular seqnence of subgtags that form a meaningful tag with the subtag.

Parameters

extlang

a lt_extlang_t.

 

Returns

a prefix string or NULL.


lt_extlang_dump ()

void
lt_extlang_dump (const lt_extlang_t *extlang);

Dumps the container information to the standard output.

Parameters

extlang

a lt_extlang_t.

 

lt_extlang_compare ()

lt_bool_t
lt_extlang_compare (const lt_extlang_t *v1,
                    const lt_extlang_t *v2);

Compares if v1 and v2 is the same object or not.

Parameters

v1

a lt_extlang_t.

 

v2

a lt_extlang_t.

 

Returns

TRUE if it's the same, otherwise FALSE.

Types and Values

lt_extlang_t

typedef struct _lt_extlang_t lt_extlang_t;

All the fields in the lt_extlang_t structure are private to the lt_extlang_t implementation.