Language switcher using get language variable instead of prefix in Drupal 8 In Drupal 8 setting  url with path prefix for language detection, works fine. But when I include the language switcher block included with Drupal, the links instead of using the language prefix, show links using the variable language in the url.

How can I make the language switcher make use of the language prefix instead?
The plugins you enable in the language detection configuration also contain the methods to build outbound paths and the language switcher links. The plugin for Url adds prefixes, not query strings. Others do, for example Session for anonymous users, so you probably have enabled a second detection method.