title: AngularJS Translate Static Files Loader
body: <p>I just recently started learning angular and i'm a bit lost with this code, could some one help me with this. Like, how i can modify it to use my en_US.json which is located at locale/locale-en_US.json.</p>
  
  <pre><code> .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');
      }
  ]);
  </code></pre>