ISO-639 lang mappings

Provides helper functions to convert between the various ISO-639 language codes, and to map language codes to language names.

Functions

gst_tag_check_language_code

gboolean
gst_tag_check_language_code (const gchar * lang_code)

Check if a given string contains a known ISO 639 language code.

This is useful in situations where it's not clear whether a given string is a language code (which should be put into a GST_TAG_LANGUAGE_CODE tag) or a free-form language name descriptor (which should be put into a GST_TAG_LANGUAGE_NAME tag instead).

Parameters:

lang_code

ISO-639 language code (e.g. "deu" or "ger" or "de")

Returns

TRUE if the two- or three-letter language code in lang_code is a valid ISO-639 language code.


GstTag.prototype.tag_check_language_code

function GstTag.prototype.tag_check_language_code(lang_code: String): {
    // javascript wrapper for 'gst_tag_check_language_code'
}

Check if a given string contains a known ISO 639 language code.

This is useful in situations where it's not clear whether a given string is a language code (which should be put into a Gst.TAG_LANGUAGE_CODE tag) or a free-form language name descriptor (which should be put into a Gst.TAG_LANGUAGE_NAME tag instead).

Parameters:

lang_code (String)

ISO-639 language code (e.g. "deu" or "ger" or "de")

Returns (Number)

TRUE if the two- or three-letter language code in lang_code is a valid ISO-639 language code.


GstTag.tag_check_language_code

def GstTag.tag_check_language_code (lang_code):
    #python wrapper for 'gst_tag_check_language_code'

Check if a given string contains a known ISO 639 language code.

This is useful in situations where it's not clear whether a given string is a language code (which should be put into a Gst.TAG_LANGUAGE_CODE tag) or a free-form language name descriptor (which should be put into a Gst.TAG_LANGUAGE_NAME tag instead).

Parameters:

lang_code (str)

ISO-639 language code (e.g. "deu" or "ger" or "de")

Returns (bool)

TRUE if the two- or three-letter language code in lang_code is a valid ISO-639 language code.


gst_tag_get_language_code_iso_639_1

const gchar *
gst_tag_get_language_code_iso_639_1 (const gchar * lang_code)

Returns two-letter ISO-639-1 language code given a three-letter ISO-639-2 language code or two-letter ISO-639-1 language code (both are accepted for convenience).

Language codes are case-sensitive and expected to be lower case.

Parameters:

lang_code

ISO-639 language code (e.g. "deu" or "ger" or "de")

Returns ( [nullable])

two-letter ISO-639-1 language code string that maps to lang_code, or NULL if no mapping is known. The returned string must not be modified or freed.


GstTag.prototype.tag_get_language_code_iso_639_1

function GstTag.prototype.tag_get_language_code_iso_639_1(lang_code: String): {
    // javascript wrapper for 'gst_tag_get_language_code_iso_639_1'
}

Returns two-letter ISO-639-1 language code given a three-letter ISO-639-2 language code or two-letter ISO-639-1 language code (both are accepted for convenience).

Language codes are case-sensitive and expected to be lower case.

Parameters:

lang_code (String)

ISO-639 language code (e.g. "deu" or "ger" or "de")

Returns (String)

two-letter ISO-639-1 language code string that maps to lang_code, or NULL if no mapping is known. The returned string must not be modified or freed.


GstTag.tag_get_language_code_iso_639_1

def GstTag.tag_get_language_code_iso_639_1 (lang_code):
    #python wrapper for 'gst_tag_get_language_code_iso_639_1'

Returns two-letter ISO-639-1 language code given a three-letter ISO-639-2 language code or two-letter ISO-639-1 language code (both are accepted for convenience).

Language codes are case-sensitive and expected to be lower case.

Parameters:

lang_code (str)

ISO-639 language code (e.g. "deu" or "ger" or "de")

Returns (str)

two-letter ISO-639-1 language code string that maps to lang_code, or NULL if no mapping is known. The returned string must not be modified or freed.


gst_tag_get_language_code_iso_639_2B

const gchar *
gst_tag_get_language_code_iso_639_2B (const gchar * lang_code)

Returns three-letter ISO-639-2 "bibliographic" language code given a two-letter ISO-639-1 language code or a three-letter ISO-639-2 language code (both are accepted for convenience).

The "bibliographic" code is derived from the English name of the language (e.g. "ger" for German instead of "de" or "deu"). In most scenarios, the "terminological" codes are preferred.

Language codes are case-sensitive and expected to be lower case.

Parameters:

lang_code

ISO-639 language code (e.g. "deu" or "ger" or "de")

Returns ( [nullable])

three-letter ISO-639-2 language code string that maps to lang_code, or NULL if no mapping is known. The returned string must not be modified or freed.


GstTag.prototype.tag_get_language_code_iso_639_2B

function GstTag.prototype.tag_get_language_code_iso_639_2B(lang_code: String): {
    // javascript wrapper for 'gst_tag_get_language_code_iso_639_2B'
}

Returns three-letter ISO-639-2 "bibliographic" language code given a two-letter ISO-639-1 language code or a three-letter ISO-639-2 language code (both are accepted for convenience).

The "bibliographic" code is derived from the English name of the language (e.g. "ger" for German instead of "de" or "deu"). In most scenarios, the "terminological" codes are preferred.

Language codes are case-sensitive and expected to be lower case.

Parameters:

lang_code (String)

ISO-639 language code (e.g. "deu" or "ger" or "de")

Returns (String)

three-letter ISO-639-2 language code string that maps to lang_code, or NULL if no mapping is known. The returned string must not be modified or freed.


GstTag.tag_get_language_code_iso_639_2B

def GstTag.tag_get_language_code_iso_639_2B (lang_code):
    #python wrapper for 'gst_tag_get_language_code_iso_639_2B'

Returns three-letter ISO-639-2 "bibliographic" language code given a two-letter ISO-639-1 language code or a three-letter ISO-639-2 language code (both are accepted for convenience).

The "bibliographic" code is derived from the English name of the language (e.g. "ger" for German instead of "de" or "deu"). In most scenarios, the "terminological" codes are preferred.

Language codes are case-sensitive and expected to be lower case.

Parameters:

lang_code (str)

ISO-639 language code (e.g. "deu" or "ger" or "de")

Returns (str)

three-letter ISO-639-2 language code string that maps to lang_code, or NULL if no mapping is known. The returned string must not be modified or freed.


gst_tag_get_language_code_iso_639_2T

const gchar *
gst_tag_get_language_code_iso_639_2T (const gchar * lang_code)

Returns three-letter ISO-639-2 "terminological" language code given a two-letter ISO-639-1 language code or a three-letter ISO-639-2 language code (both are accepted for convenience).

The "terminological" code is derived from the local name of the language (e.g. "deu" for German instead of "ger"). In most scenarios, the "terminological" codes are preferred over the "bibliographic" ones.

Language codes are case-sensitive and expected to be lower case.

Parameters:

lang_code

ISO-639 language code (e.g. "deu" or "ger" or "de")

Returns ( [nullable])

three-letter ISO-639-2 language code string that maps to lang_code, or NULL if no mapping is known. The returned string must not be modified or freed.


GstTag.prototype.tag_get_language_code_iso_639_2T

function GstTag.prototype.tag_get_language_code_iso_639_2T(lang_code: String): {
    // javascript wrapper for 'gst_tag_get_language_code_iso_639_2T'
}

Returns three-letter ISO-639-2 "terminological" language code given a two-letter ISO-639-1 language code or a three-letter ISO-639-2 language code (both are accepted for convenience).

The "terminological" code is derived from the local name of the language (e.g. "deu" for German instead of "ger"). In most scenarios, the "terminological" codes are preferred over the "bibliographic" ones.

Language codes are case-sensitive and expected to be lower case.

Parameters:

lang_code (String)

ISO-639 language code (e.g. "deu" or "ger" or "de")

Returns (String)

three-letter ISO-639-2 language code string that maps to lang_code, or NULL if no mapping is known. The returned string must not be modified or freed.


GstTag.tag_get_language_code_iso_639_2T

def GstTag.tag_get_language_code_iso_639_2T (lang_code):
    #python wrapper for 'gst_tag_get_language_code_iso_639_2T'

Returns three-letter ISO-639-2 "terminological" language code given a two-letter ISO-639-1 language code or a three-letter ISO-639-2 language code (both are accepted for convenience).

The "terminological" code is derived from the local name of the language (e.g. "deu" for German instead of "ger"). In most scenarios, the "terminological" codes are preferred over the "bibliographic" ones.

Language codes are case-sensitive and expected to be lower case.

Parameters:

lang_code (str)

ISO-639 language code (e.g. "deu" or "ger" or "de")

Returns (str)

three-letter ISO-639-2 language code string that maps to lang_code, or NULL if no mapping is known. The returned string must not be modified or freed.


gst_tag_get_language_codes

gchar **
gst_tag_get_language_codes ()

Returns a list of known language codes (in form of two-letter ISO-639-1 codes). This is useful for UIs to build a list of available languages for tagging purposes (e.g. to tag an audio track appropriately in a video or audio editor).

Returns ( [transfer: full][arrayzero-terminated=1])

NULL-terminated string array with two-letter language codes. Free with g_strfreev when no longer needed.


GstTag.prototype.tag_get_language_codes

function GstTag.prototype.tag_get_language_codes(): {
    // javascript wrapper for 'gst_tag_get_language_codes'
}

Returns a list of known language codes (in form of two-letter ISO-639-1 codes). This is useful for UIs to build a list of available languages for tagging purposes (e.g. to tag an audio track appropriately in a video or audio editor).

Returns ([ String ])

NULL-terminated string array with two-letter language codes. Free with GLib.prototype.strfreev when no longer needed.


GstTag.tag_get_language_codes

def GstTag.tag_get_language_codes ():
    #python wrapper for 'gst_tag_get_language_codes'

Returns a list of known language codes (in form of two-letter ISO-639-1 codes). This is useful for UIs to build a list of available languages for tagging purposes (e.g. to tag an audio track appropriately in a video or audio editor).

Returns ([ str ])

NULL-terminated string array with two-letter language codes. Free with GLib.strfreev when no longer needed.


gst_tag_get_language_name

const gchar *
gst_tag_get_language_name (const gchar * language_code)

Returns the name of the language given an ISO-639 language code as found in a GST_TAG_LANGUAGE_CODE tag. The name will be translated according to the current locale (if the library was built against the iso-codes package, otherwise the English name will be returned).

Language codes are case-sensitive and expected to be lower case.

Parameters:

language_code

two or three-letter ISO-639 language code

Returns ( [nullable])

language name in UTF-8 format, or NULL if language_code could not be mapped to a language name. The returned string must not be modified and does not need to freed; it will stay valid until the application is terminated.


GstTag.prototype.tag_get_language_name

function GstTag.prototype.tag_get_language_name(language_code: String): {
    // javascript wrapper for 'gst_tag_get_language_name'
}

Returns the name of the language given an ISO-639 language code as found in a GST_TAG_LANGUAGE_CODE tag. The name will be translated according to the current locale (if the library was built against the iso-codes package, otherwise the English name will be returned).

Language codes are case-sensitive and expected to be lower case.

Parameters:

language_code (String)

two or three-letter ISO-639 language code

Returns (String)

language name in UTF-8 format, or NULL if language_code could not be mapped to a language name. The returned string must not be modified and does not need to freed; it will stay valid until the application is terminated.


GstTag.tag_get_language_name

def GstTag.tag_get_language_name (language_code):
    #python wrapper for 'gst_tag_get_language_name'

Returns the name of the language given an ISO-639 language code as found in a GST_TAG_LANGUAGE_CODE tag. The name will be translated according to the current locale (if the library was built against the iso-codes package, otherwise the English name will be returned).

Language codes are case-sensitive and expected to be lower case.

Parameters:

language_code (str)

two or three-letter ISO-639 language code

Returns (str)

language name in UTF-8 format, or NULL if language_code could not be mapped to a language name. The returned string must not be modified and does not need to freed; it will stay valid until the application is terminated.


The results of the search are