getgrav / grav-plugin-langswitcher

Grav LangSwitcher Plugin
https://getgrav.org
MIT License
28 stars 26 forks source link

Let the root url be the default language without any language path #53

Closed johBerlin closed 4 years ago

johBerlin commented 4 years ago

Hello folks,

I run a multi-lang page with two languages. EN is my default. Right now when I go to the root domain. I get redirected to the path /en. Is it possible to not do that? Like the root domain is en with out any path and if the language gets switched to German it is /de.

It would get a better page speed for the root domain since there is no redirect. Any ideas how to do that?

mahagr commented 4 years ago

There's a setting in the Admin > Configuration for this under the language section. Just hover on the labels and you'll see descriptions of the options.

Or check out the documentation of Grav (Learn site).

johBerlin commented 4 years ago

Thanks @mahagr, this was not directly what I wanted to do, but actually this is the better solution. By disabling "Include default language" in Configurations -> Language Settings all en URLs will not have ".../en/..." in them. Thus, my root url is now plain and nice.

johBerlin commented 4 years ago

Thanks @mahagr, this was not directly what I wanted to do, but actually this is the better solution. By disabling "Include default language" in Configurations -> Language Settings all en URLs will not have ".../en/..." in them. Thus, my root url is now plain and nice.