/** * as_node_get_localized_best: * @node: a #AsNode. * @key: the tag name. * * Gets the 'best' locale version of a specific data value. * * Returns: the string value, or %NULL if there was no data * * Since: 0.1.0 **/ const gchar * as_node_get_localized_best (const AsNode *node, const gchar *key) { g_autoptr(GHashTable) hash = NULL; hash = as_node_get_localized (node, key); if (hash == NULL) return NULL; return as_hash_lookup_by_locale (hash, NULL); }
/** * as_screenshot_get_caption: * @screenshot: a #AsScreenshot instance. * @locale: the locale, or %NULL. e.g. "en_GB" * * Gets the image caption for a specific locale. * * Returns: the caption * * Since: 0.1.0 **/ const gchar * as_screenshot_get_caption (AsScreenshot *screenshot, const gchar *locale) { AsScreenshotPrivate *priv = GET_PRIVATE (screenshot); return as_hash_lookup_by_locale (priv->captions, locale); }