all files / lib/i18n/ I18N.js

100% Statements 3/3
100% Branches 0/0
100% Functions 2/2
100% Lines 3/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18                             
/**
 * A component that handles language switching in a unified way.
 *
 * @param {EventBus} eventBus
 */
export default function I18N(eventBus) {
 
  /**
   * Inform components that the language changed.
   *
   * Emit a `i18n.changed` event for others to hook into, too.
   */
  this.changed = function changed() {
    eventBus.fire('i18n.changed');
  };
}
 
I18N.$inject = [ 'eventBus' ];