"active" code on header not working

First, when defining a menu structure in site configuration, use pageRef for internal pages, and url for external pages.

Second, do not include the language prefix in the pageRef value.

Your site configuration should look like this:

[languages.en]
contentDir = 'content/english'
description = 'Kaliriu in English'
languageCode = 'en-US'
languageName = 'English'
weight = 1

[[languages.en.menu.main]]
identifier = 'home'
name = 'Home'
pageRef = '/'
weight = 1

[[languages.en.menu.main]]
identifier = 'projects'
name = 'Projects'
pageRef = '/projects'
weight = 2

[[languages.en.menu.main]]
identifier = 'blog'
name = 'Blog'
pageRef = '/blog'
weight = 3

[[languages.en.menu.main]]
identifier = 'contact'
name = 'Contact'
pageRef = '/contact'
weight = 4

[languages.es]
contentDir = 'content/spanish'
description = 'Kaliriu en Español'
languageCode = 'es-ES'
languageName = 'Español'
weight = 2

[[languages.es.menu.main]]
identifier = 'inicio'
name = 'Inicio'
pageRef = '/'
weight = 1

[[languages.es.menu.main]]
identifier = 'proyectos'
name = 'Proyectos'
pageRef = '/projects'
weight = 2

[[languages.es.menu.main]]
identifier = 'blog'
name = 'Blog'
pageRef = '/blog'
weight = 3

[[languages.es.menu.main]]
identifier = 'contacto'
name = 'Contacto'
pageRef = '/contact'
weight = 4
1 Like