## Modulemd.Translation Modulemd.Translation — Translation information for a module stream. |

## Stability Level

Stable, unless otherwise indicated

## Functions

ModulemdTranslation * | modulemd_translation_new ()
ModulemdTranslation * | modulemd_translation_copy ()
gboolean | modulemd_translation_validate ()
void | modulemd_translation_set_modified ()
GStrv | modulemd_translation_get_locales_as_strv ()
void | modulemd_translation_set_translation_entry ()
ModulemdTranslationEntry * | modulemd_translation_get_translation_entry ()

## Properties

guint64 | modified | Read / Write
char * | module-name | Read / Write / Construct Only
char * | module-stream | Read / Write / Construct Only
guint64 | version | Read / Write / Construct Only

## Types and Values

#define | MODULEMD_TYPE_TRANSLATION
| ModulemdTranslation

## Object Hierarchy

        GObject
        ╰── ModulemdTranslation

## Description

## Functions

### modulemd_translation_new ()

    ModulemdTranslation *
    modulemd_translation_new (guint64 version,
                              const gchar *module_name,
                              const gchar *module_stream,
                              guint64 modified);

#### Parameters

version | The metadata version of this ModulemdTranslation. |
module_name | The name of the module to which these translations apply. |
module_stream | The name of the module stream to which these translations apply. |
modified | The last modified time represented as a 64-bit integer (such as 201807011200). |

#### Returns

A newly-allocated ModulemdTranslation object. This object must be freed with `g_object_unref()`.

[transfer full]

Since: 2.0

### modulemd_translation_copy ()

    ModulemdTranslation *
    modulemd_translation_copy (ModulemdTranslation *self);

Create a copy of this ModulemdTranslation object.

#### Parameters

self | This ModulemdTranslation object. |

#### Returns

The copied ModulemdTranslation object.

[transfer full]

Since: 2.0

### modulemd_translation_validate ()

    gboolean
    modulemd_translation_validate (ModulemdTranslation *self,
                                   GError **error);

This method ensures that the translation is internally consistent for usage or dumping to YAML. It will be run implicitly prior to emitting YAML. This is not a complete linter, merely a sanity check that the values are not impossible.

#### Parameters

self | This ModulemdTranslation object. |
error | If the object is not valid, it will return the reason. | [out]

Since: 2.0

### modulemd_translation_set_modified ()

    void
    modulemd_translation_set_modified (ModulemdTranslation *self,
                                       guint64 modified);

#### Parameters

self | This ModulemdTranslation object. |
modified | The last modified time represented as a 64-bit integer (such as 201807011200). |

Since: 2.0

### modulemd_translation_get_locales_as_strv ()

    GStrv
    modulemd_translation_get_locales_as_strv
                                   (ModulemdTranslation *self);

[rename-to modulemd_translation_get_locales]

#### Parameters

self | This ModulemdTranslation object. |

#### Returns

An ordered GStrv list of locales known to this ModulemdTranslation.

[transfer full]

Since: 2.0

### modulemd_translation_set_translation_entry ()

    void
    modulemd_translation_set_translation_entry
                                   (ModulemdTranslation *self,
                                    ModulemdTranslationEntry *translation_entry);

#### Parameters

self | This ModulemdTranslation object. |
translation_entry | A set of translations of this module stream for a particular locale. |

Since: 2.0

### modulemd_translation_get_translation_entry ()

    ModulemdTranslationEntry *
    modulemd_translation_get_translation_entry
                                   (ModulemdTranslation *self,
                                    const gchar *locale);

#### Parameters

self | This ModulemdTranslation object. |
locale | The locale of the translation to retrieve. |

#### Returns

The translation entry for the requested locale, or NULL if the locale was unknown.

[transfer none]

Since: 2.0

## Types and Values

### MODULEMD_TYPE_TRANSLATION

    #define MODULEMD_TYPE_TRANSLATION (modulemd_translation_get_type ())

### ModulemdTranslation

    typedef struct _ModulemdTranslation ModulemdTranslation;

## Property Details

### The `“modified”` property

      “modified”                 guint64

The last modified time represented as a 64-bit integer (such as 201807011200).

Owner: ModulemdTranslation

Flags: Read / Write

Default value: 0

### The `“module-name”` property

      “module-name”              char *

The name of the module to which these translations apply.

Owner: ModulemdTranslation

Flags: Read / Write / Construct Only

Default value: "__TRANSLATION_VALUE_UNSET__"

### The `“module-stream”` property

      “module-stream”            char *

The name of the module stream to which these translations apply.

Owner: ModulemdTranslation

Flags: Read / Write / Construct Only

Default value: "__TRANSLATION_VALUE_UNSET__"

### The `“version”` property

      “version”                  guint64

The metadata version of this Translation object.

Owner: ModulemdTranslation

Flags: Read / Write / Construct Only

Default value: 0