Language in url with base_url variable


there is a litle problem with the antimatter theme in url when you specify one or more languages. In my case, I specified french language (fr) only and choose FALSE for include_default_lang variable in admin plugin.

Then, all url are displayed without locale, excepted url using base_url, base_url_relative or base_url_absolute variables. With these variables, the locale is added in urls!

I solved the problem using this code in twig template:

{% if config.system.languages.include_default_lang == false %}
	{% set lang = grav.language.getActive() %}
	{% set search = '/'~lang~'/' %}
	{% set base_url_relative = base_url_relative.replace({(search):'/'}) %}
{% endif %}

But I think there is a better way to do this? By modifying all base_url... variables programmatically? Using a redirection?

Thx for your help

Actually it’s not an issue for Antimatter, it’s a core Grav thing. I think if include_default_lang is set to false, the base_url type URLs shouldn’t have the language code in them.

Can you please submit an issue here: