Default language url problem after upgrading from v3.0.1 to v3.1.0

Hello,
I am so pleased with the new features that version 3.1.0 has brought to me and I couldn’t wait to upgrade my instance from version 3.0.1. But a small issue of multi-language appeared once the upgrade of kirby was done.
I have both languages of Chinese and English. I have a config file for language of English,

<?php
return array (
  'code' => 'en',
  'default' => true,
  'direction' => 'ltr',
  'locale' => 'en_US',
  'name' => 'English',
  'url' => '/'
);

And I have a config file for language of Chinese,

<?php
return array (
  'code' => 'zh',
  'default' => false,
  'direction' => 'ltr',
  'locale' => 'zh_CN',
  'name' => 'Chinese',
  'url' => '/zh'
);

When I go to the home page, I will be redirected to /zh automatically. When I reset the version of kirby back to v3.0.1, the problem disappeared.
Is this a bug or just a new feature? What can I do if I would like to realize the idea of setting ‘/’ as the url for default language ‘English’?
Thanks!

Hi, I’m experiencing the same, or at least a similar issue when updated to 3.1.0. I have the site operating both in English and Finnish. The issue seems to be related to the language of the browser.

  • English site URL is company-name.com
  • Finnish site URL is company-name.com/fi
  • Testing with latest Firefox, browser language set to English. Everything works fine
  • Testing with latest Firefox, browser language set to Finnish. When accessing company-name.com, everything renders in Finnish. The URL remains though, no /fi-appendix

This only happens in the home page, in all other pages language switching seems to be working as expected.

Sorry for the inconvenience. Yes, there is already an issue on GitHub. There will be a fix today.

2 Likes

I just fixed this and created a release candidate for a patch release: https://github.com/getkirby/kirby/issues/1603#issuecomment-475170255

Could you give it a try as well and let me know if this fixes the issue for you?

Sorry for the extra work!

1 Like

Cannot speak for the OP, but the release candidate fixed this problem for me. Thanks!

1 Like

Yes, that fixed the problem.
Thank you for your work!

1 Like