yahoo/mojito — pull request #935 by gomezd (2013-01-17 18:12:47+00:00)
Title: Add support for a shared app levellang bundle

This change is to allow using a "shared app level" lang bundle for getting localized strings available for the whole application.

The yui lang module will be located in: `/lang/shared.js`.

This is similar to the `config` addon, where you have `ac.config.get()` for mojit level configs vs `ac.config.getAppConfig()` to get the app level config.
In this case it would be `ac.intl.lang()` for mojit level langs vs `ac.intl.appLang()` for app level strings.

For example:
The default shared app level lang bundle would be:
`/lang/shared.js`
```javascript
YUI.add("lang/shared", function (Y) {
"use strict";

Y.Intl.add(
"shared",
"",
{
"APP_TITLE": "This is my app title"
}
);
}, "0.0.1", {
requires: ["intl"]
});
```
The localized files (i.e. spanish), would be:
`/lang/shared_es-MX.js`
```javascript
YUI.add("lang/shared_es-MX", function (Y) {
"use strict";

Y.Intl.add(
"shared",
"es-MX",
{
"APP_TITLE": "Este es el título de mi aplicación"
}
);
}, "0.0.1", {
requires: ["intl"]
});
```

And so any controller can get app level strings from the `intl` addon:
```javascript
YUI.add('CustomHTMLFrameMojit', function (Y, NAME) {

Y.mojito.controllers[NAME] = {

index: function (ac) {
var title = ac.intl.appLang('APP_TITLE');
```

An example use case is for dynamically changing/translating the application title.