title: AngularJS inject $http into config for angular-translate
body: <p>I'm using angular-translate module and am trying to inject all my translations that are on server with $http. I use a provider and I know that only i can inject dependencies through $get but I can't call that function from my provider. I need to know if i can do this and how i do it.</p>
  
  <p>This is my provider. </p>
  
  <pre><code>.provider('languageServices', function (){
  
      this.languages = {};
  
      this.getExistLanguages = function() {
        return ['en','es'];
      };
  
      this.getAllLanguages = function(){
        return this.languages;
      };
  
      this.$get = function($http){
        return {
          getSpecificLanguage : function(lan) {
            return  this.languages = $http.post('fr3/i18n',lan);
          }
        }
      };
    });
  </code></pre>
  
  <p>this is my config app</p>
  
  <pre><code>    .config(function ($stateProvider, $urlRouterProvider, USER_ROLES, $translateProvider, languageServicesProvider) {
              $stateProvider.state('dashboard', {
                      url: '/dashboard',
                      views: {
                          'header': {template: ''},
                          'content': { templateUrl: 'views/dashboard.html' }
                      },
                      data: { authorizedRoles: [USER_ROLES.admin] }
                  });
  
              $translateProvider.preferredLanguage('es');
      // here is where i want inject all my translations with something like:
     // var languages = languageServicesProvider.getAllLanguages();
  //and languages pass it to translateProvider
          });
  </code></pre>
  
  <p>I know this code has some errors but I only want you have a idea that I want to do.</p>
  
  <p>Thanks</p>