Module

i18NHelper

This module contains utility functions to get various locale specific data (internationalization functions)

View Source frontend/helpers/i18n_helper.js, line 20

Methods

# static getLanguageName(code, includeNativeNameopt, currentLocaleopt) → {string}

Function to get localized language name. Uses module:languageMapper.getLanguageName under the hood

Parameters:
Name Type Attributes Default Description
code string

2-letter ISO 639-1 or 3-letter ISO 639-2/T or 3-letter language code

includeNativeName boolean <optional>
false

either to add an extra native name in parenthesis

currentLocale string <optional>
null

language code to return language name in (language name localization). If not provided uses current app locale

View Source frontend/helpers/i18n_helper.js, line 88

localized language name if available. Otherwise language name in default locale (English) or initial language code

string