Keep language selected and filter by category

Current ghost version: Version 3.5.2

Currently let say I have a example blog site called

I have added a language picker in the nav area where I have many languages: English, French, German, Spanish etc…

When clicking on one of the languages(lets say I clicked Spanish) from the language selector I get routed to the route


Under this URL I see all the posts that were tagged with #es

This works for all the languages but I want to be able to also filter based on different tags.

Let’s say each post can be under one of 3 categories:

-Green Tea,
-Black Tea,
-White Tea.

In the navigation area, I can click on one of these categories I get routed to the posts that have the correct tags

If I click on green tea from the navigation I get:

This shows all of the posts with the tag #greentea in the post.

What I want to do now:

  1. When selecting a language from the dropdown and navigate to either one of (green, black, white)
  • I want to keep the language preference and go to the correct categories
    -The URL should be exampleteawebsite/es-es/greentea

How do I keep the language that the user selected and when they are navigating through the site and clicking on different links that they are seeing content that also has both the language and the category?

Currently I have a route.yaml:

permalink: /{slug}/
filter: ‘tag:-hash-localized’
permalink: /de-de/{slug}/
filter: ‘tag:hash-de-de’
template: ‘tag’
permalink: /fr-fr/{slug}/
filter: ‘tag:hash-fr-fr’
template: ‘tag’
permalink: /es-es/{slug}/
filter: ‘tag:hash-es-es’
template: ‘tag’