public function getLanguages()
    {
        // Cache by locale
        $locale = i18n::get_locale();
        if (!empty(static::$cache_languages[$locale])) {
            return static::$cache_languages[$locale];
        }

        // Localise all languages
        $languages = $this->config()->get('languages');
        $localised = [];
        foreach ($languages as $code => $default) {
            $localised[$code] = $this->languageName($code);
        }

        // Save cache
        static::$cache_languages[$locale] = $localised;
        return $localised;
    }