kaman.functions.js
function lang(key, source) {
    //first we retrive the lang value of the root of the DOM
    var LANG = document.documentElement.lang;
    //console.log(source)
    //console.log(LANG+' '+key+' - '+source[LANG][key]);
    if (_.isObject(source) && _.isObject(source[LANG]) && _.isString(source[LANG][key])) {
        return source[LANG][key]
    } else {
        return key
    }

}
function lang(key, source) {
    //first we retrive the lang value of the root of the DOM
    var LANG = document.documentElement.lang;
    //console.log(source)
    //console.log(LANG+' '+key+' - '+source[LANG][key]);
    if (_.isObject(source) && _.isObject(source[LANG]) && _.isString(source[LANG][key])) {
        return source[LANG][key]
    } else {
        return key
    }

}
function lang ( key , source ) { //first we retrive the lang value of the root of the DOM var LANG = document . documentElement . lang ; //console.log(source) //console.log(LANG+' '+key+' - '+source[LANG][key]); if ( _ . isObject ( source ) && _ . isObject ( source [ LANG ] ) && _ . isString ( source [ LANG ] [ key ] ) ) { return source [ LANG ] [ key ] } else { return key } }
utility function to get the language value from keys
on a languageSource object acording the specified language
comming from the server and placed in the
@param key String, the key to search of
@param source Object, the list to search for the key
@return string, the key value if it is in the source list, otherwise will retrun the key name
utility function to get the language value from keys on a languageSource object acording the specified language comming from the server and placed in the