<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
  <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
]>
<refentry id="AsTranslation">
<refmeta>
<refentrytitle role="top_of_page" id="AsTranslation.top_of_page">AsTranslation</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>APPSTREAM Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>AsTranslation</refname>
<refpurpose>Description of translation domains for an upstream component.</refpurpose>
</refnamediv>

<refsect1 id="AsTranslation.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_return" colwidth="150px"/>
<colspec colname="functions_name"/>
<tbody>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="as-translation-kind-to-string">as_translation_kind_to_string</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="AsTranslationKind"><returnvalue>AsTranslationKind</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-translation-kind-from-string">as_translation_kind_from_string</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="AsTranslation"><returnvalue>AsTranslation</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="as-translation-new">as_translation_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="AsTranslationKind"><returnvalue>AsTranslationKind</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-translation-get-kind">as_translation_get_kind</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-translation-set-kind">as_translation_set_kind</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="as-translation-get-id">as_translation_get_id</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="as-translation-set-id">as_translation_set_id</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AsTranslation.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="name" colwidth="150px"/>
<colspec colname="description"/>
<tbody>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="AS-TYPE-TRANSLATION:CAPS">AS_TYPE_TRANSLATION</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="AsTranslationClass">AsTranslationClass</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="AsTranslationKind">AsTranslationKind</link></entry></row>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="AsTranslation-struct">AsTranslation</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AsTranslation.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> AsTranslation
</screen>
</refsect1>

<refsect1 id="AsTranslation.includes"><title>Includes</title><synopsis>#include &lt;appstream.h&gt;
</synopsis></refsect1>

<refsect1 id="AsTranslation.description" role="desc">
<title role="desc.title">Description</title>
<para>Describes the translation domain and translation system used by the upstream component.
See <ulink url="https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-translation">the specification</ulink> for
more information on the corresponding XML tag.</para>
<para>See also: <link linkend="AsComponent"><type>AsComponent</type></link></para>

</refsect1>
<refsect1 id="AsTranslation.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="as-translation-kind-to-string" role="function">
<title>as_translation_kind_to_string&#160;()</title>
<indexterm zone="as-translation-kind-to-string"><primary>as_translation_kind_to_string</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
as_translation_kind_to_string (<parameter><link linkend="AsTranslationKind"><type>AsTranslationKind</type></link> kind</parameter>);</programlisting>
<para>Converts the enumerated value to a text representation.</para>
<refsect3 id="as-translation-kind-to-string.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>kind</para></entry>
<entry role="parameter_description"><para>the <link linkend="AsTranslationKind"><type>AsTranslationKind</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="as-translation-kind-to-string.returns" role="returns">
<title>Returns</title>
<para> string version of <parameter>kind</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="as-translation-kind-from-string" role="function">
<title>as_translation_kind_from_string&#160;()</title>
<indexterm zone="as-translation-kind-from-string"><primary>as_translation_kind_from_string</primary></indexterm>
<programlisting language="C"><link linkend="AsTranslationKind"><returnvalue>AsTranslationKind</returnvalue></link>
as_translation_kind_from_string (<parameter>const <link linkend="gchar"><type>gchar</type></link> *kind_str</parameter>);</programlisting>
<para>Converts the text representation to an enumerated value.</para>
<refsect3 id="as-translation-kind-from-string.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>kind_str</para></entry>
<entry role="parameter_description"><para>the string.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="as-translation-kind-from-string.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="AsTranslationKind"><type>AsTranslationKind</type></link> or <link linkend="AS-TRANSLATION-KIND-UNKNOWN:CAPS"><literal>AS_TRANSLATION_KIND_UNKNOWN</literal></link> for unknown</para>
</refsect3></refsect2>
<refsect2 id="as-translation-new" role="function">
<title>as_translation_new&#160;()</title>
<indexterm zone="as-translation-new"><primary>as_translation_new</primary></indexterm>
<programlisting language="C"><link linkend="AsTranslation"><returnvalue>AsTranslation</returnvalue></link>&#160;*
as_translation_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="AsTranslation"><type>AsTranslation</type></link>.</para>
<refsect3 id="as-translation-new.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="AsTranslation"><type>AsTranslation</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="as-translation-get-kind" role="function">
<title>as_translation_get_kind&#160;()</title>
<indexterm zone="as-translation-get-kind"><primary>as_translation_get_kind</primary></indexterm>
<programlisting language="C"><link linkend="AsTranslationKind"><returnvalue>AsTranslationKind</returnvalue></link>
as_translation_get_kind (<parameter><link linkend="AsTranslation"><type>AsTranslation</type></link> *tr</parameter>);</programlisting>
<para>The translation system type.</para>
<refsect3 id="as-translation-get-kind.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tr</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsTranslation"><type>AsTranslation</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="as-translation-get-kind.returns" role="returns">
<title>Returns</title>
<para> an enum of type <link linkend="AsTranslationKind"><type>AsTranslationKind</type></link></para>
</refsect3></refsect2>
<refsect2 id="as-translation-set-kind" role="function">
<title>as_translation_set_kind&#160;()</title>
<indexterm zone="as-translation-set-kind"><primary>as_translation_set_kind</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_translation_set_kind (<parameter><link linkend="AsTranslation"><type>AsTranslation</type></link> *tr</parameter>,
                         <parameter><link linkend="AsTranslationKind"><type>AsTranslationKind</type></link> kind</parameter>);</programlisting>
<para>Set the translation system type.</para>
<refsect3 id="as-translation-set-kind.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tr</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsTranslation"><type>AsTranslation</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>kind</para></entry>
<entry role="parameter_description"><para>the new <link linkend="AsTranslationKind"><type>AsTranslationKind</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-translation-get-id" role="function">
<title>as_translation_get_id&#160;()</title>
<indexterm zone="as-translation-get-id"><primary>as_translation_get_id</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
as_translation_get_id (<parameter><link linkend="AsTranslation"><type>AsTranslation</type></link> *tr</parameter>);</programlisting>
<para>The ID (e.g. Gettext translation domain) of this translation.</para>
<refsect3 id="as-translation-get-id.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tr</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsTranslation"><type>AsTranslation</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="as-translation-set-id" role="function">
<title>as_translation_set_id&#160;()</title>
<indexterm zone="as-translation-set-id"><primary>as_translation_set_id</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
as_translation_set_id (<parameter><link linkend="AsTranslation"><type>AsTranslation</type></link> *tr</parameter>,
                       <parameter>const <link linkend="gchar"><type>gchar</type></link> *id</parameter>);</programlisting>
<para>Set the ID (e.g. Gettext domain) of this translation.</para>
<refsect3 id="as-translation-set-id.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tr</para></entry>
<entry role="parameter_description"><para>a <link linkend="AsTranslation"><type>AsTranslation</type></link> instance.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>id</para></entry>
<entry role="parameter_description"><para>The ID of this translation.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="AsTranslation.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="AS-TYPE-TRANSLATION:CAPS" role="macro">
<title>AS_TYPE_TRANSLATION</title>
<indexterm zone="AS-TYPE-TRANSLATION:CAPS"><primary>AS_TYPE_TRANSLATION</primary></indexterm>
<programlisting language="C">#define AS_TYPE_TRANSLATION (as_translation_get_type ())
</programlisting>
<para>
</para>
</refsect2>
<refsect2 id="AsTranslationClass" role="struct">
<title>struct AsTranslationClass</title>
<indexterm zone="AsTranslationClass"><primary>AsTranslationClass</primary></indexterm>
<programlisting language="C">struct AsTranslationClass {
	GObjectClass		parent_class;
};
</programlisting>
<para>
</para>
</refsect2>
<refsect2 id="AsTranslationKind" role="enum">
<title>enum AsTranslationKind</title>
<indexterm zone="AsTranslationKind"><primary>AsTranslationKind</primary></indexterm>
<para>The translation type.</para>
<refsect3 id="AsTranslationKind.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="AS-TRANSLATION-KIND-UNKNOWN:CAPS">AS_TRANSLATION_KIND_UNKNOWN</para></entry>
<entry role="enum_member_description"><para>Type invalid or not known</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="AS-TRANSLATION-KIND-GETTEXT:CAPS">AS_TRANSLATION_KIND_GETTEXT</para></entry>
<entry role="enum_member_description"><para>Gettext translation domain</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="AS-TRANSLATION-KIND-QT:CAPS">AS_TRANSLATION_KIND_QT</para></entry>
<entry role="enum_member_description"><para>Qt translation domain</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="AsTranslation-struct" role="struct">
<title>AsTranslation</title>
<indexterm zone="AsTranslation-struct"><primary>AsTranslation</primary></indexterm>
<programlisting language="C">typedef struct _AsTranslation AsTranslation;</programlisting>
<para>
</para>
</refsect2>

</refsect1>

</refentry>
