title: AngularJS - how to trigger filter on ng-click
body: <p>I'm trying to make simple multi-language website.
  I have a small controller just to be able to change current language in root scope:</p>
  
  <pre><code>   app.controller('Ctrl', function($scope, $rootScope) {
         $rootScope.currentLang = 'en_US';
         $scope.switchLang = function(){
              if($rootScope.currentLang ==='en_US'){
                  $rootScope.currentLang = 'cs_CS';
              } else {
                  $rootScope.currentLang = 'en_US';
              }
          }
      });
  </code></pre>
  
  <p>And I want to store my data in filter:</p>
  
  <pre><code>   app.filter('ci18n', function($rootScope){
         return function(id_text){
             var translations = {
                 'en_US' : {
                     'GREETING' : 'Hi'
                 },
                 'cs_CS' : {
                     'GREETING' : 'Cau'  
                 }
              };
  
              return translations[$rootScope.currentLang][id_text];
          };
      });
  </code></pre>
  
  <p>Problem is that my website does't change with rootScope change.
  I need an idea how to solve it better or how to trigger filter again to change my texts.</p>
  
  <p>Here is how I use the filter</p>
  
  <pre><code>&lt;p&gt;greet: {{'GREETING' | ci18n}}&lt;/p&gt;
  </code></pre>