Is there a way to get supportedSites for a category page?
It turns out that getSupportedSites() returns different results for categories and standard entries so an additional check needs to take place. 

The solution below has been tested with a single group with multiple languages, and it works, although I hope there's a better solution than this one:

If the current page is a category then assign it to the entry variable

{% set entry = category %}


Then:

{# Retrieve all supported sites for the current entry #}
{% set supportedSites = entry.getSupportedSites %}

&lt;ul&gt;
{% for siteForEntry in supportedSites %}
  {% if siteForEntry | length == 1 %}
    {# category #}
    {% set site = craft.app.getSites.getSiteById(siteForEntry) %}
    {% set entryForOtherSite = craft.categories.id(entry.id).site(site).one() %}
  {% elseif siteForEntry | length == 2 %}
    {# standard entry #}
    {% set site = craft.app.getSites.getSiteById(siteForEntry.siteId) %}
    {% set entryForOtherSite = craft.entries.id(entry.id).site(site).one() %}
  {% endif %}

  {% if site.id == entry.siteId %}
      {# This is the current language, mark it as active and don't retrieve its url #}
      &lt;li class="current"&gt;&lt;a href="#"&gt;{{site.language}}&lt;/a&gt;&lt;/li&gt;
  {% else %}
      {# if it's not the current site, get the entry for this site #}
      &lt;li&gt;&lt;a href="{{ entryForOtherSite.getUrl() }}"&gt;{{site.language}}&lt;/a&lt;/li&gt;
  {% endif %}

{% endfor %}
&lt;/ul&gt;