diff --git a/Gruntfile.js b/Gruntfile.js index 01d1704..9f912e3 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -98,7 +98,8 @@ module.exports = function (grunt) { }, files: { 'i18n/fr_FR/LC_MESSAGES/Alltube.mo': 'i18n/fr_FR/LC_MESSAGES/Alltube.po', - 'i18n/zh_CN/LC_MESSAGES/Alltube.mo': 'i18n/zh_CN/LC_MESSAGES/Alltube.po' + 'i18n/zh_CN/LC_MESSAGES/Alltube.mo': 'i18n/zh_CN/LC_MESSAGES/Alltube.po', + 'i18n/es_ES/LC_MESSAGES/Alltube.mo': 'i18n/es_ES/LC_MESSAGES/Alltube.po' } } }, diff --git a/classes/LocaleManager.php b/classes/LocaleManager.php index aeed169..7e36e8c 100644 --- a/classes/LocaleManager.php +++ b/classes/LocaleManager.php @@ -63,7 +63,9 @@ class LocaleManager $process->run(); $installedLocales = explode(PHP_EOL, trim($process->getOutput())); foreach ($this->supportedLocales as $supportedLocale) { - if (in_array($supportedLocale, $installedLocales)) { + if (in_array($supportedLocale, $installedLocales) + || in_array($supportedLocale.'.utf8', $installedLocales) + ) { $return[] = new Locale($supportedLocale); } }