function lookupLabel(labels, defaultLabel, locale) {
        if (labels) {
            if (labels[locale]) {
                return labels[locale];
            }
            if (locale) {
                var lang = locale.substring(0, 2);
                if (labels[lang]) {
                    return labels[lang];
                }
            }
        }
        return defaultLabel;
    }
Lookup text for specific locale
@param labels - dict of labels
@param defaultLabel - fallback label if not found
@param locale - target locale
@returns {string} text for specified locale