widget-i18n.js revision d57e8af4277d928d616e3b91b4b26693d18903e1
var TRUE = true,
LOCALE = "locale",
INIT_VALUE = "initValue",
HYPHEN = "-",
EMPTY_STR = "",
/**
* @attribute locale
* @description
* @default "en"
* @type String
*/
value: "en"
};
/**
* Sets strings for a particular locale, merging with any existing
* strings which may already be defined for the locale.
*
* @method _setStrings
* @protected
* @param {Object} locale The locale for the string values being set
*/
}
},
/**
*
* @method _getStrings
* @protected
* @param {Object} locale
*/
_getStrings : function(locale) {
},
/**
* Gets the entire strings hash for a particular locale, performing locale lookup.
* <p>
* If no values of the key are defined for a particular locale the value for the
* default locale (in initial locale set for the class) is returned.
* </p>
* @method getStrings
* @param {String} locale (optional) The locale for which the string value is required. Defaults to the current locale, if not provided.
*/
getStrings : function(locale) {
i, l,
// If locale is different than the default, or needs lookup support
lookup += localeSegments[i];
if (localeStrs) {
}
}
}
return strs;
},
/**
* Gets the string for a particular key, for a particular locale, performing locale lookup.
* <p>
* If no values if defined for the key, for the given locale, the value for the
* default locale (in initial locale set for the class) is returned.
* </p>
* @method getString
* @param {String} key The key.
* @param {String} locale (optional) The locale for which the string value is required. Defaults to the current locale, if not provided.
*/
// If locale is different than the default, or needs lookup support
do {
break;
}
// Chop of last locale segment
if (idx != -1) {
}
} while (idx != -1);
}
return str;
},
/**
* Returns the default locale for the widget (the locale value defined by the
* widget class, or provided by the user during construction).
*
* @method getDefaultLocale
* @return {String} The default locale for the widget
*/
getDefaultLocale : function() {
},
_strSetter : function(val) {
},
_strGetter : function(val) {
}
}, true);