Getting full native language name in Craft3 language switcher
The site.language attribute is just a string, i.e. the language code or locale ID, e.g. 'en'.

To get the native name you'll need to go through the I18N service to pull the actual Locale object via that locale ID:

{% set locale = craft.app.i18n.getLocaleById(lang.language) %}
&lt;a href="{{url}}"&gt;{{ locale.nativeName }}&lt;/a&gt;


Edit: As @Dr_Codswallop mentions in the comments, locale.nativeName is deprecated in Craft 3, and will be removed completely in Craft 4. locale.displayName should be used instead.