Describe the bug
I want to run my Statamic 2 page with two different languages (de_DE, en_US).
Basically I followed the guide in the docs https://docs.statamic.com/localization
I decided to use a subdomain, so the URLs look like this:
locales:
de:
full: de_DE
name: Deutsch
url: '{env:LOCALE_DOMAIN_DE}'
en:
full: en_GB
name: English
url: '{env:LOCALE_DOMAIN_EN}'
Locally I'm using Valet (Linux) and to make it work I also had to symlink the folders assets, site and img (image_manipulation_cached_path for glide) into the en direcory.
Describe the bug I want to run my Statamic 2 page with two different languages (de_DE, en_US). Basically I followed the guide in the docs https://docs.statamic.com/localization
I decided to use a subdomain, so the URLs look like this:
My locales config in
system.yaml
:Locally I'm using Valet (Linux) and to make it work I also had to symlink the folders assets, site and img (image_manipulation_cached_path for glide) into the en direcory.
Also locally my URLs are like these:
Until here everything works fine.
I now implemented a language switcher that looks like this:![image](https://user-images.githubusercontent.com/14234815/75612681-2ff9b400-5b26-11ea-97ac-f9e3124b1d6f.png)
The problem is, that both links (
DE
andEN
) always link to the de locale on whatever page or locale I currently am. Example: http://example.test/my/sub/path => http://example.test/my/sub/pathFor testing purposes I temporarily changed to a path based locale (/en/) and that was working correctly. Example: Example: http://example.test/my/sub/path => http://example.test/en/my/sub/path
Expected behavior I want the
EN
link pointing to the current page but with the URL for the locale defined in system.yaml. Example: http://example.test/my/sub/path => http://en.example.test/my/sub/pathEnvironment details (please complete the following information):