Commit f6c836c4 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Usa bandera como botón de cambio de idioma

parent a9c3eef0
Loading
Loading
Loading
Loading
+18 −1
Original line number Diff line number Diff line
@@ -74,7 +74,9 @@ define([
			this.inherited(arguments);

			put(this.domNode, '[title=$]', this.i18n.language);
			put(this.domNode, 'i.fa.fa-language');

			var languageIcon = this._getLanguageIcon(window.lang);
			put(this.domNode, 'i.' + languageIcon);

			this._publish(this.listMenu.getChannel('ADD_EVT'), {
				sourceNode: this.domNode
@@ -99,6 +101,21 @@ define([
			window.location.href = protocol + '//' + language + '.' + hostnameWithoutLang;
		},

		_getLanguageIcon: function(currentLanguage) {

			var iconClasses;

			if (currentLanguage === 'es') {
				iconClasses = 'flag.flag-icon-background.flag-icon-es';
			} else if (currentLanguage === 'en') {
				iconClasses = 'flag.flag-icon-background.flag-icon-gb';
			} else {
				iconClasses = 'fa.fa-language';
			}

			return iconClasses;
		},

		_getNodeToShow: function() {

			return this.domNode;
Compare 3f6c089f to ae6f9c74
Original line number Diff line number Diff line
Subproject commit 3f6c089f25ba8e1c66d8008f251c4be486ee8c37
Subproject commit ae6f9c746a46e0205f9013f12c22c24cabc0ff4f