1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>ISO-639 lang mappings: GStreamer Base Plugins 1.0 Library Reference Manual</title> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual"> 8<link rel="up" href="gstreamer-tag.html" title="Tag Support Library"> 9<link rel="prev" href="gst-plugins-base-libs-GstTagMux.html" title="GstTagMux"> 10<link rel="next" href="gst-plugins-base-libs-Licenses.html" title="Licenses"> 11<meta name="generator" content="GTK-Doc V1.28 (XML mode)"> 12<link rel="stylesheet" href="style.css" type="text/css"> 13</head> 14<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 15<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> 16<td width="100%" align="left" class="shortcuts"> 17<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 18 <a href="#gst-plugins-base-libs-ISO-639-lang-mappings.description" class="shortcut">Description</a></span> 19</td> 20<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> 21<td><a accesskey="u" href="gstreamer-tag.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> 22<td><a accesskey="p" href="gst-plugins-base-libs-GstTagMux.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 23<td><a accesskey="n" href="gst-plugins-base-libs-Licenses.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> 24</tr></table> 25<div class="refentry"> 26<a name="gst-plugins-base-libs-ISO-639-lang-mappings"></a><div class="titlepage"></div> 27<div class="refnamediv"><table width="100%"><tr> 28<td valign="top"> 29<h2><span class="refentrytitle"><a name="gst-plugins-base-libs-ISO-639-lang-mappings.top_of_page"></a>ISO-639 lang mappings</span></h2> 30<p>ISO-639 lang mappings — mappings for ISO-639 language codes and names</p> 31</td> 32<td class="gallery_image" valign="top" align="right"></td> 33</tr></table></div> 34<div class="refsect1"> 35<a name="gst-plugins-base-libs-ISO-639-lang-mappings.functions"></a><h2>Functions</h2> 36<div class="informaltable"><table class="informaltable" width="100%" border="0"> 37<colgroup> 38<col width="150px" class="functions_return"> 39<col class="functions_name"> 40</colgroup> 41<tbody> 42<tr> 43<td class="function_type"> 44<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> ** 45</td> 46<td class="function_name"> 47<a class="link" href="gst-plugins-base-libs-ISO-639-lang-mappings.html#gst-tag-get-language-codes" title="gst_tag_get_language_codes ()">gst_tag_get_language_codes</a> <span class="c_punctuation">()</span> 48</td> 49</tr> 50<tr> 51<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * 52</td> 53<td class="function_name"> 54<a class="link" href="gst-plugins-base-libs-ISO-639-lang-mappings.html#gst-tag-get-language-name" title="gst_tag_get_language_name ()">gst_tag_get_language_name</a> <span class="c_punctuation">()</span> 55</td> 56</tr> 57<tr> 58<td class="define_keyword">#define</td> 59<td class="function_name"> 60<a class="link" href="gst-plugins-base-libs-ISO-639-lang-mappings.html#gst-tag-get-language-code" title="gst_tag_get_language_code()">gst_tag_get_language_code</a><span class="c_punctuation">()</span> 61</td> 62</tr> 63<tr> 64<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * 65</td> 66<td class="function_name"> 67<a class="link" href="gst-plugins-base-libs-ISO-639-lang-mappings.html#gst-tag-get-language-code-iso-639-1" title="gst_tag_get_language_code_iso_639_1 ()">gst_tag_get_language_code_iso_639_1</a> <span class="c_punctuation">()</span> 68</td> 69</tr> 70<tr> 71<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * 72</td> 73<td class="function_name"> 74<a class="link" href="gst-plugins-base-libs-ISO-639-lang-mappings.html#gst-tag-get-language-code-iso-639-2B" title="gst_tag_get_language_code_iso_639_2B ()">gst_tag_get_language_code_iso_639_2B</a> <span class="c_punctuation">()</span> 75</td> 76</tr> 77<tr> 78<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * 79</td> 80<td class="function_name"> 81<a class="link" href="gst-plugins-base-libs-ISO-639-lang-mappings.html#gst-tag-get-language-code-iso-639-2T" title="gst_tag_get_language_code_iso_639_2T ()">gst_tag_get_language_code_iso_639_2T</a> <span class="c_punctuation">()</span> 82</td> 83</tr> 84<tr> 85<td class="function_type"> 86<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 87</td> 88<td class="function_name"> 89<a class="link" href="gst-plugins-base-libs-ISO-639-lang-mappings.html#gst-tag-check-language-code" title="gst_tag_check_language_code ()">gst_tag_check_language_code</a> <span class="c_punctuation">()</span> 90</td> 91</tr> 92</tbody> 93</table></div> 94</div> 95<div class="refsect1"> 96<a name="gst-plugins-base-libs-ISO-639-lang-mappings.includes"></a><h2>Includes</h2> 97<pre class="synopsis">#include <gst/tag/tag.h> 98</pre> 99</div> 100<div class="refsect1"> 101<a name="gst-plugins-base-libs-ISO-639-lang-mappings.description"></a><h2>Description</h2> 102<p>Provides helper functions to convert between the various ISO-639 language 103codes, and to map language codes to language names.</p> 104</div> 105<div class="refsect1"> 106<a name="gst-plugins-base-libs-ISO-639-lang-mappings.functions_details"></a><h2>Functions</h2> 107<div class="refsect2"> 108<a name="gst-tag-get-language-codes"></a><h3>gst_tag_get_language_codes ()</h3> 109<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> ** 110gst_tag_get_language_codes (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> 111<p>Returns a list of known language codes (in form of two-letter ISO-639-1 112codes). This is useful for UIs to build a list of available languages for 113tagging purposes (e.g. to tag an audio track appropriately in a video or 114audio editor).</p> 115<div class="refsect3"> 116<a name="gst-tag-get-language-codes.returns"></a><h4>Returns</h4> 117<p>NULL-terminated string array with two-letter 118language codes. Free with <a href="/usr/share/gtk-doc/html/glib/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> when no longer needed. </p> 119<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 120</div> 121</div> 122<hr> 123<div class="refsect2"> 124<a name="gst-tag-get-language-name"></a><h3>gst_tag_get_language_name ()</h3> 125<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * 126gst_tag_get_language_name (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *language_code</code></em>);</pre> 127<p>Returns the name of the language given an ISO-639 language code as 128found in a GST_TAG_LANGUAGE_CODE tag. The name will be translated 129according to the current locale (if the library was built against the 130iso-codes package, otherwise the English name will be returned).</p> 131<p>Language codes are case-sensitive and expected to be lower case.</p> 132<div class="refsect3"> 133<a name="gst-tag-get-language-name.parameters"></a><h4>Parameters</h4> 134<div class="informaltable"><table class="informaltable" width="100%" border="0"> 135<colgroup> 136<col width="150px" class="parameters_name"> 137<col class="parameters_description"> 138<col width="200px" class="parameters_annotations"> 139</colgroup> 140<tbody><tr> 141<td class="parameter_name"><p>language_code</p></td> 142<td class="parameter_description"><p>two or three-letter ISO-639 language code</p></td> 143<td class="parameter_annotations"> </td> 144</tr></tbody> 145</table></div> 146</div> 147<div class="refsect3"> 148<a name="gst-tag-get-language-name.returns"></a><h4>Returns</h4> 149<p> language name in UTF-8 format, or NULL if <em class="parameter"><code>language_code</code></em> 150could 151not be mapped to a language name. The returned string must not be 152modified and does not need to freed; it will stay valid until the 153application is terminated.</p> 154</div> 155</div> 156<hr> 157<div class="refsect2"> 158<a name="gst-tag-get-language-code"></a><h3>gst_tag_get_language_code()</h3> 159<pre class="programlisting">#define gst_tag_get_language_code(lang_code)</pre> 160<p>Convenience macro wrapping <a class="link" href="gst-plugins-base-libs-ISO-639-lang-mappings.html#gst-tag-get-language-code-iso-639-1" title="gst_tag_get_language_code_iso_639_1 ()"><code class="function">gst_tag_get_language_code_iso_639_1()</code></a>.</p> 161<div class="refsect3"> 162<a name="gst-tag-get-language-code.parameters"></a><h4>Parameters</h4> 163<div class="informaltable"><table class="informaltable" width="100%" border="0"> 164<colgroup> 165<col width="150px" class="parameters_name"> 166<col class="parameters_description"> 167<col width="200px" class="parameters_annotations"> 168</colgroup> 169<tbody><tr> 170<td class="parameter_name"><p>lang_code</p></td> 171<td class="parameter_description"><p>ISO-639 language code (e.g. "deu" or "ger" or "de")</p></td> 172<td class="parameter_annotations"> </td> 173</tr></tbody> 174</table></div> 175</div> 176</div> 177<hr> 178<div class="refsect2"> 179<a name="gst-tag-get-language-code-iso-639-1"></a><h3>gst_tag_get_language_code_iso_639_1 ()</h3> 180<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * 181gst_tag_get_language_code_iso_639_1 (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *lang_code</code></em>);</pre> 182<p>Returns two-letter ISO-639-1 language code given a three-letter ISO-639-2 183language code or two-letter ISO-639-1 language code (both are accepted for 184convenience).</p> 185<p>Language codes are case-sensitive and expected to be lower case.</p> 186<div class="refsect3"> 187<a name="gst-tag-get-language-code-iso-639-1.parameters"></a><h4>Parameters</h4> 188<div class="informaltable"><table class="informaltable" width="100%" border="0"> 189<colgroup> 190<col width="150px" class="parameters_name"> 191<col class="parameters_description"> 192<col width="200px" class="parameters_annotations"> 193</colgroup> 194<tbody><tr> 195<td class="parameter_name"><p>lang_code</p></td> 196<td class="parameter_description"><p>ISO-639 language code (e.g. "deu" or "ger" or "de")</p></td> 197<td class="parameter_annotations"> </td> 198</tr></tbody> 199</table></div> 200</div> 201<div class="refsect3"> 202<a name="gst-tag-get-language-code-iso-639-1.returns"></a><h4>Returns</h4> 203<p> two-letter ISO-639-1 language code string that maps to <em class="parameter"><code>lang_code</code></em> 204, 205or NULL if no mapping is known. The returned string must not be 206modified or freed.</p> 207</div> 208</div> 209<hr> 210<div class="refsect2"> 211<a name="gst-tag-get-language-code-iso-639-2B"></a><h3>gst_tag_get_language_code_iso_639_2B ()</h3> 212<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * 213gst_tag_get_language_code_iso_639_2B (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *lang_code</code></em>);</pre> 214<p>Returns three-letter ISO-639-2 "bibliographic" language code given a 215two-letter ISO-639-1 language code or a three-letter ISO-639-2 language 216code (both are accepted for convenience).</p> 217<p>The "bibliographic" code is derived from the English name of the language 218(e.g. "ger" for German instead of "de" or "deu"). In most scenarios, the 219"terminological" codes are prefered.</p> 220<p>Language codes are case-sensitive and expected to be lower case.</p> 221<div class="refsect3"> 222<a name="gst-tag-get-language-code-iso-639-2B.parameters"></a><h4>Parameters</h4> 223<div class="informaltable"><table class="informaltable" width="100%" border="0"> 224<colgroup> 225<col width="150px" class="parameters_name"> 226<col class="parameters_description"> 227<col width="200px" class="parameters_annotations"> 228</colgroup> 229<tbody><tr> 230<td class="parameter_name"><p>lang_code</p></td> 231<td class="parameter_description"><p>ISO-639 language code (e.g. "deu" or "ger" or "de")</p></td> 232<td class="parameter_annotations"> </td> 233</tr></tbody> 234</table></div> 235</div> 236<div class="refsect3"> 237<a name="gst-tag-get-language-code-iso-639-2B.returns"></a><h4>Returns</h4> 238<p> three-letter ISO-639-2 language code string that maps to <em class="parameter"><code>lang_code</code></em> 239, 240or NULL if no mapping is known. The returned string must not be 241modified or freed.</p> 242</div> 243</div> 244<hr> 245<div class="refsect2"> 246<a name="gst-tag-get-language-code-iso-639-2T"></a><h3>gst_tag_get_language_code_iso_639_2T ()</h3> 247<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * 248gst_tag_get_language_code_iso_639_2T (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *lang_code</code></em>);</pre> 249<p>Returns three-letter ISO-639-2 "terminological" language code given a 250two-letter ISO-639-1 language code or a three-letter ISO-639-2 language 251code (both are accepted for convenience).</p> 252<p>The "terminological" code is derived from the local name of the language 253(e.g. "deu" for German instead of "ger"). In most scenarios, the 254"terminological" codes are prefered over the "bibliographic" ones.</p> 255<p>Language codes are case-sensitive and expected to be lower case.</p> 256<div class="refsect3"> 257<a name="gst-tag-get-language-code-iso-639-2T.parameters"></a><h4>Parameters</h4> 258<div class="informaltable"><table class="informaltable" width="100%" border="0"> 259<colgroup> 260<col width="150px" class="parameters_name"> 261<col class="parameters_description"> 262<col width="200px" class="parameters_annotations"> 263</colgroup> 264<tbody><tr> 265<td class="parameter_name"><p>lang_code</p></td> 266<td class="parameter_description"><p>ISO-639 language code (e.g. "deu" or "ger" or "de")</p></td> 267<td class="parameter_annotations"> </td> 268</tr></tbody> 269</table></div> 270</div> 271<div class="refsect3"> 272<a name="gst-tag-get-language-code-iso-639-2T.returns"></a><h4>Returns</h4> 273<p> three-letter ISO-639-2 language code string that maps to <em class="parameter"><code>lang_code</code></em> 274, 275or NULL if no mapping is known. The returned string must not be 276modified or freed.</p> 277</div> 278</div> 279<hr> 280<div class="refsect2"> 281<a name="gst-tag-check-language-code"></a><h3>gst_tag_check_language_code ()</h3> 282<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 283gst_tag_check_language_code (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *lang_code</code></em>);</pre> 284<p>Check if a given string contains a known ISO 639 language code.</p> 285<p>This is useful in situations where it's not clear whether a given 286string is a language code (which should be put into a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GST-TAG-LANGUAGE-CODE:CAPS"><span class="type">GST_TAG_LANGUAGE_CODE</span></a> 287tag) or a free-form language name descriptor (which should be put into a 288<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GST-TAG-LANGUAGE-NAME:CAPS"><span class="type">GST_TAG_LANGUAGE_NAME</span></a> tag instead).</p> 289<div class="refsect3"> 290<a name="gst-tag-check-language-code.parameters"></a><h4>Parameters</h4> 291<div class="informaltable"><table class="informaltable" width="100%" border="0"> 292<colgroup> 293<col width="150px" class="parameters_name"> 294<col class="parameters_description"> 295<col width="200px" class="parameters_annotations"> 296</colgroup> 297<tbody><tr> 298<td class="parameter_name"><p>lang_code</p></td> 299<td class="parameter_description"><p>ISO-639 language code (e.g. "deu" or "ger" or "de")</p></td> 300<td class="parameter_annotations"> </td> 301</tr></tbody> 302</table></div> 303</div> 304<div class="refsect3"> 305<a name="gst-tag-check-language-code.returns"></a><h4>Returns</h4> 306<p> TRUE if the two- or three-letter language code in <em class="parameter"><code>lang_code</code></em> 307is a valid ISO-639 language code.</p> 308</div> 309</div> 310</div> 311<div class="refsect1"> 312<a name="gst-plugins-base-libs-ISO-639-lang-mappings.other_details"></a><h2>Types and Values</h2> 313</div> 314<div class="refsect1"> 315<a name="gst-plugins-base-libs-ISO-639-lang-mappings.see-also"></a><h2>See Also</h2> 316<p><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GstTagList-struct"><span class="type">GstTagList</span></a></p> 317</div> 318</div> 319<div class="footer"> 320<hr>Generated by GTK-Doc V1.28</div> 321</body> 322</html>