title: How to add translations to $translateProvider from outside the config?
body: <p>I am new to angular js. For language translation I am using angular-translate service in my work.I am getting the entire translations which I need to assign in $translateProvider by an API call response.I know that I can assign the translations to $translateprovider ($translateprovider.translations ('en',translations) only from config module but I think that an API call from config module is not a good practise. </p>
  
  <p>Below given is my config module.</p>
  
  <pre><code>    .config(['$translateProvider', function($translateProvider) {
  
              //fetching session key
              var response;
              jQuery.ajax({
                  type: "GET",
                  url: 'https://abcdefg/session?appKey=123456',
                  async: false,
                 success: function(data) {
                     response = data;
                      getMetaData(response.sessionKey);
  
                  }
              });
  
              ////fetching data.
              function getMetaData(sessionKey) {
                  jQuery.ajax({
                      type: "GET",
                      url: 'https://abcdefg/metadata?sessionKey=' + sessionKey +
                          '&amp;gid=1.2.3.4',
                      async: false,
                      success: function(data) {
                          dataSet = data; //save response in rootscope variable
                      }
                  });
              }
  
  
              $translateProvider.translations('en_US', JSON.parse(dataSet.en_us));
              $translateProvider.translations('es_ES', JSON.parse(dataSet.es_es));
              $translateProvider.preferredLanguage('en_US');
  }
  </code></pre>
  
  <p>How can this be solved? How can I assign translations to $translateProvider from out side the config module?</p>
  
  <p>Thanks in advance.</p>