angular/angular.js — pull request #2458 by lgalfaso (2013-04-20 19:45:37+00:00)
Title: feat($locale): add a `set` method to change the locale

Currently it is not possible to have two angular applications on the same page that use different locales, at least not without some hackery like the one present on the angular home page

```javascript
$script('http://code.angularjs.org/1.0.6/i18n/angular-locale_sk.js', function() {
angular.module('ngLocal.sk', [])._invokeQueue.push(angular.module('ngLocale')._invokeQueue[0]);
bootstrap();
});
$script('http://code.angularjs.org/1.0.6/i18n/angular-locale_en-us.js', function() {
angular.module('ngLocal.us', [])._invokeQueue.push(angular.module('ngLocale')._invokeQueue[0]);
bootstrap();
});
```

This patch add to $locale a `set` method that will make it change to a new locale
Also change the i18n conversion so arrays are not converted to plain
objects, this is not consistent with the built-in implementation
nor with the existing tests