Just dipping my toes into the world of Angular and feeling a bit overwhelmed by this code. Can someone lend a hand? I'm trying to figure out how to tweak it to use my en_US.json file located at locale/locale-en_US.json.
.factory("$translateStaticFilesLoader", ["$q", "$http",
function(a, b) {
return function(c) {
if (!c || !angular.isString(c.prefix) || !angular.isString(c.suffix)) throw new Error("Couldn't load static files, no prefix or suffix specified!");
var d = a.defer();
return b({
url: [c.prefix, c.key, c.suffix].join("../locale/locale-"),
method: "GET",
params: ".json"
}).success(function(a) {
d.resolve(a)
}).error(function() {
d.reject(c.key)
}), d.promise
}
$translateProvider.preferredLanguage('en_US');
}
]);