intl-base-debug.js revision d93098c1210cde80acf722647709d148161ba6bd
a) _explodeLang()
1) Explode static meta-data "lang" property into first class modules
var langModuleName = loader._formatLang(lang, module);
b) _useLang(lang)
Support for Y.use("lang:fr-CA"); or Y.use("lang:fr-CA;module");
1) Y.Intl.lookupBestLang(module, lang)
2) loader._formatLang(module, lang)
3) loader.insert(module_lang)
4) Y._attach(module_lang)
c) getAvailableLangs(module)
1) Loop through meta-data for the module, to get available langs
getAvailableLangs() support feasible?
Loop through meta-data for all "loaded" modules, to get the common
subset (could be presented as an app level dropdown for example).
d) Register custom langs
1). Same as any module?
*/
/**
* The Intl utility provides a central location for managing language specific sets of strings and formatting patterns.
* @module intl
*/
/**
* The intl-load sub-module provides utilities for loader language support
*
* @module yui
* @submodule intl-base
*/
/**
* The Intl utility provides a central location for managing language specific sets of strings and formatting patterns.
*
* @class Intl
* @static
*/
var SPLIT_REGEX = /[, ]/;
/**
* Finds the best language match, from the list of available languages based on BCP 47 lookup.
*
* @method lookupBestLang
* @param {String} lang The BCP 47 language tag to find the best match for
* @param {Array} supportedLangs An array of supported langauge codes
*
* @return {String} The BCP 47 language tag
*/
// check whether the list of available languages contains language; if so return it
var i;
return availableLanguages[i];
}
}
}
}
language = preferredLanguages[i];
continue;
}
// check the fallback sequence for one language
if (result) {
return result;
} else {
if (index >= 0) {
// one-character subtags get cut along with the following subtag
}
} else {
// nothing available for this language
break;
}
}
}
}
return "";
},
_explodeLang : function() {
// LOADER STUB
},
// LOADER STUB
},
getAvailableLangs : function(module) {
// META-DATA STUB
}
});