title: Change language on Ionic2 - What is the most effective way to change all page language?
body: <p>I am trying to use <a href="https://github.com/ngx-translate/core#api" rel="nofollow noreferrer">ng2-translate</a> on <code>Ionic2</code> to do the multi-language, and I added a <code>button</code> for changing the language of the <code>Apps</code> on the <code>setting page</code>. Basically, the function of changing language is work on the setting page only, but the other page will not happen anything.</p>
  
  <p>And I have a stupid way to do the translation, that is add a function ,which change the language of the current page, on every pages and it will be executed when I click the button on the <code>setting page</code>. </p>
  
  <p>But this solution less efficiency,  how can do the same thing in a effective way?</p>
  
  <p>Here is a part of my code:</p>
  
  <ol>
  <li><p>Setting Page:</p>
  
  <pre><code>  import { Component,  ViewChild } from '@angular/core';
  
    import { NavController, List } from 'ionic-angular';
    import {TranslateService, TranslatePipe, TranslateLoader, TranslateStaticLoader} from 'ng2-translate/ng2-translate';
    @Component({
        selector: 'page-setting',
        templateUrl: 'setting.html'
     })
  
    export class SettingPage {
        translate;
       @ViewChild(List) list: List;
       constructor(public navCtrl: NavController,   translate: TranslateService) {
            translate.setDefaultLang('zh');
            this.translate = translate;
        }
         //When the translation button is clicked
         click() {
            this.translate.use('en');
                 //Change all the pages language
                 location.change('en');`enter code here`
                 home.change('en');
           }
  
    }
  </code></pre></li>
  </ol>