private static function buildLanguageArray(IMetaModel $metaModel, TranslatorInterface $translator)
    {
        $languages = array();
        foreach ((array) $metaModel->getAvailableLanguages() as $langCode) {
            $languages[$langCode] = $translator->translate('LNG.' . $langCode, 'languages');
        }
        asort($languages);

        return $languages;
    }