AsTranslation: AppStream Library Reference Manual

## AsTranslation AsTranslation — Description of translation domains for an upstream component. |

## Functions

const gchar * | as_translation_kind_to_string ()
AsTranslationKind | as_translation_kind_from_string ()
AsTranslation * | as_translation_new ()
AsTranslationKind | as_translation_get_kind ()
void | as_translation_set_kind ()
const gchar * | as_translation_get_id ()
void | as_translation_set_id ()

## Types and Values

#define | AS_TYPE_TRANSLATION
struct | AsTranslationClass
enum | AsTranslationKind
| AsTranslation

## Object Hierarchy

        GObject
        ╰── AsTranslation

## Includes

    #include <appstream.h>

## Description

Describes the translation domain and translation system used by the upstream component. See the specification for more information on the corresponding XML tag.

See also: AsComponent

## Functions

### as_translation_kind_to_string ()

    const gchar *
    as_translation_kind_to_string (AsTranslationKind kind);

Converts the enumerated value to a text representation.

#### Parameters

kind | the AsTranslationKind. |

#### Returns

string version of `kind`

### as_translation_kind_from_string ()

    AsTranslationKind
    as_translation_kind_from_string (const gchar *kind_str);

Converts the text representation to an enumerated value.

#### Parameters

kind_str | the string. |

#### Returns

a AsTranslationKind or `AS_TRANSLATION_KIND_UNKNOWN` for unknown

### as_translation_new ()

    AsTranslation *
    as_translation_new (void);

Creates a new AsTranslation.

#### Returns

a AsTranslation.

[transfer full]

### as_translation_get_kind ()

    AsTranslationKind
    as_translation_get_kind (AsTranslation *tr);

The translation system type.

#### Parameters

tr | a AsTranslation instance. |

#### Returns

an enum of type AsTranslationKind

### as_translation_set_kind ()

    void
    as_translation_set_kind (AsTranslation *tr,
                             AsTranslationKind kind);

Set the translation system type.

#### Parameters

tr | a AsTranslation instance. |
kind | the new AsTranslationKind |

### as_translation_get_id ()

    const gchar *
    as_translation_get_id (AsTranslation *tr);

The ID (e.g. Gettext translation domain) of this translation.

#### Parameters

tr | a AsTranslation instance. |

### as_translation_set_id ()

    void
    as_translation_set_id (AsTranslation *tr,
                           const gchar *id);

Set the ID (e.g. Gettext domain) of this translation.

#### Parameters

tr | a AsTranslation instance. |
id | The ID of this translation. |

## Types and Values

### AS_TYPE_TRANSLATION

    #define AS_TYPE_TRANSLATION (as_translation_get_type ())

### struct AsTranslationClass

    struct AsTranslationClass {
    	GObjectClass		parent_class;
    };

### enum AsTranslationKind

The translation type.

#### Members

AS_TRANSLATION_KIND_UNKNOWN | Type invalid or not known |
AS_TRANSLATION_KIND_GETTEXT | Gettext translation domain |
AS_TRANSLATION_KIND_QT | Qt translation domain |

### AsTranslation

    typedef struct _AsTranslation AsTranslation;