Methods

(async, inner) buildDropdown(elements, locale, level, locales) → {Promise.<void>}

The method is called recursively to add dropdown elements for locales and nested locales to the elements param.

The nesting level of the current locale can be determined by the locale.keys[] array property.

Parameters:
NameTypeDescription
elementsarray

Array of HTMLElements.

localeobject

The current locale.

levelnumber

Current nesting level.

localesArray.<Object>

List of locales at the current level.

Returns:
Type: 
Promise.<void>

(async, inner) locales(locale, locales) → {Promise.<(HTMLElement|undefined)>}

Calls the buildDropdown method to recursively add locale dropdowns to the elements array rendered into the locales interface node returned.

Parameters:
NameTypeDescription
localeObject

The currently loaded locale object.

localesArray.<Object>

Array of accessible locale objects at the current level.

Returns:

Node containing dropdown elements or undefined.

Type: 
Promise.<(HTMLElement|undefined)>