/**
* @author Dipl.-Ing. (FH) Martin Mayrhofer-Reinhartshuber
* @author Marko Jozic
* @copyright 2009-2011, Netzmühle Internetagentur
* @since 19.08.2009
* @since 07.09.2011
*/

// create module
NmRia_Translation = function() {
    // do NOT access DOM from here; elements don't exist yet
 
    // private variables
	translations = {};
    // private functions
 
    // public space
    return {
        // public properties, e.g. strings to translate
        // win: null,
        
        // public functios        
        translate: function(word) {
    		if(translations[word] != undefined && translations[word][locale] != undefined) {
    			return translations[word][locale];
    		}
    		for(var i in NmTranslations) {
    			if(NmTranslations[i][masterLocale] == word) {
    				translations[word] = {};
    				translations[word][locale] = NmTranslations[i][locale];
    				return NmTranslations[i][locale];
    			}
    		}
    		return word;
        }
    };
}(); // end of module
