var o = {lang: l[0], flag: l[1], url: url, langName: l[3], countryName: l[4]};
// $this.multilang[$this.multilang.length] = o;
- $this.multilang[l[0]] = o; // Indexed by language code to allow easier lookups later
+ var languageID = l[0] + '_' + l[1];
+ $this.multilang[languageID] = o; // Indexed by language code + flag to allow easier lookups later and allow multiple variations of the same language
});
},
getActiveFlag: function () {
// Format the language name according to the settings
getLanguageName: function (languageCode) {
+ // Todo: once we have the Fluidbook country/flag avialble (see ticket #2173), we need to use that to build the language code (ie. language_country)
+ // Todo: check if languageCode passed in includes underscore and if not, append the country to make the full language ID matched in this.multilang
+
var details = this.multilang[languageCode],
name = '';
}
return this.translations[str];
}
-};
\ No newline at end of file
+};
}
} else if (icon == 'lang' && this.fluidbook.l10n.multilangEnabled) {
// Note: the "!" at the beginning of the title/help parameters means that we don't want these strings translated
- link = this.addLink(navType, 'nav-locales', '#/locales', 'locales', '!' + this.fluidbook.l10n.getCurrentLanguageName(), '!Select Language');
+ //link = this.addLink(navType, 'nav-locales', '#/locales', 'locales', '!' + this.fluidbook.l10n.getCurrentLanguageName(), '!Select Language');
+ // Todo: remove this temporary link and re-instate original link above when ticket #2173 is done so we can display proper language name
+ link = this.addLink(navType, 'nav-locales', '#/locales', 'locales', '!Select Language', '!Select Language'); // Label says "Select Language" until we can have the country code recorded for the Fluidbook
} else if (icon == 'archives') {
if (this.fluidbook.datas.archivesLink != '') {
link = this.addLink(navType, 'nav-archives', this.fluidbook.datas.archivesLink, 'archives', '!' + this.fluidbook.datas.archivesLabel, '!' + this.fluidbook.datas.archivesLabel);