From: Vincent Vanwaelscappel Date: Tue, 14 Aug 2018 09:25:29 +0000 (+0200) Subject: #2170 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=81332dc0c173dd135ffaff2e59836bcf7d9ab7c2;p=fluidbook-html5.git #2170 --- diff --git a/js/libs/fluidbook/fluidbook.l10n.js b/js/libs/fluidbook/fluidbook.l10n.js index ed9e8a22..1d683c9f 100644 --- a/js/libs/fluidbook/fluidbook.l10n.js +++ b/js/libs/fluidbook/fluidbook.l10n.js @@ -43,7 +43,7 @@ FluidbookL10N.prototype = { } // Append country when lang is present more than one time in the list - if (this._langsCount[res] > 1) { + if (undefined !== this._langsCount && this._langsCount[res] > 1) { res += '_' + this.fluidbook.datas.country; } return res; @@ -132,10 +132,6 @@ FluidbookL10N.prototype = { // 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 = '';