How to get full native language instead of iso?
I am not using WPML or Polylang, but multisite to create multiple languages. The code below is used to make a language switcher, but I want a second menu with the full language name for a different menu (i.e. EN should be English, FR - Français, DE - Deutsch). Wordpress has the native names stored (because when selecting a language you get a list with the native language name), but how can I access this to use?
$languages = get_available_languages();
foreach ($languages as $item) {
$iso = substr($item, 0, 2);
echo 'li'. $iso .'/li';
}
Topic multi-language multisite theme-development Wordpress
Category Web