title: Auto populate the i18n language in ng-grid - AngularJS
body: <p>I have an application that uses localization(i18n) - AngularJS.</p>
  
  <p>I have used a simple ng-grid from here-  </p>
  
  <p><a href="https://github.com/angular-ui/ng-grid/wiki/Configuration-Options" rel="nofollow">https://github.com/angular-ui/ng-grid/wiki/Configuration-Options</a></p>
  
  <p><strong>Code:</strong>  </p>
  
  <pre><code>$scope.gridOptions = {
  data: 'filteredData',
  enablePaging: true, 
  enableColumnResize: true,
  multiSelect: false,
  virtualizationThreshold: 20,
  enableRowSelection: true,
  columnDefs: 'columnDefs1',
  i18n: $rootScope.myLangVariable,
  };
  </code></pre>
  
  <p><strong>Problem:</strong><br>
  I want to reinitialize the grid on language change and display all the column header + the static data in the selected language.</p>
  
  <p><strong>Things I have tried:</strong><br>
  I have applied watch on the language variable and on its change I have called a function which will fire $scope.gridOptions. But this is not working.<br>
  All the data on the page is changed (respective of the selected language) except of that ng-grid.</p>
  
  <p>I am sure this issue would have come to many of the developers here. Please help! Let me know you if need more clarification.  </p>
  
  <p>Thanks in advance. </p>