title: Caching internationalization JSON data in AngularJS
body: <p>Here i am created multi-language concept in my application its working fine, but language (.json)  file loaded for every field, So application taking time to load, my requirement is i want to load .json only once  to fetch all the data , how to do in angularJs, Thanks for your help in advance </p>
  
  <p>please check the below link also </p>
  
  <p><a href="http://plnkr.co/edit/PYZxcI5yTNuA0fEern9s?p=preview" rel="nofollow">http://plnkr.co/edit/PYZxcI5yTNuA0fEern9s?p=preview</a></p>
  
  <pre><code>var language = 'en';
  
  app.directive('telBasictext', ['$http', 'teli18nservice',
    function($http, teli18nservice) {
      return {
        restrict: 'AEC',
        require: 'ngModel',
        scope: {
          ngModel: '=',
        },
        template: '&lt;div  class="form-group"  &gt; ' +
          '&lt;label  &gt;  {{ setvalue }} &lt;/label&gt; ' +
          '&lt;div  &gt; &lt;input type="{{ textboxtype }}" ng-model="ngModel"  &gt;&lt;/div&gt;&lt;/div&gt;',
  
        link: function(scope, iElement, iAttrs, ngModelController) {
          var collecton = iAttrs.getString;
          var splitValues = collecton.split(",");
          var language = splitValues[0]; // Language EN or Fr
          var labelName = splitValues[1]; // Label Name
          var moduleName = splitValues[2]; // Module Name (global or local)
          teli18nservice.getdata(moduleName).success(function(data) {
              scope.setvalue = data[labelName];
            })
            .error(function(error) {
              scope.setvalue = "No Label";
            });
        }
      };
    }
  ]);
  </code></pre>