Closed moefuerst closed 5 years ago
I can't reproduce this, works like expected for me.
I will try in a different environment and report back.
Here is the language configuration used:
/site/languages/en.php
<?php
return [
'code' => 'en',
'default' => true,
'direction' => 'ltr',
'locale' => 'en_US',
'name' => 'English',
'url' => '/',
];
/site/languages/de.php
<?php
return [
'code' => 'de',
'default' => false,
'direction' => 'ltr',
'locale' => 'de_AT',
'name' => 'Deutsch',
];
For testing the localization, I just created home.de.txt
with a localized Title:
in the content folder and added <?= $page->title() ?>
to the header snippet.
Did you use a fresh Starterkit?
Did you use a fresh Starterkit?
Yes. Fresh download and no changes made other than the ones outlined above.
I tried on my server too now, here's a live demo: Notice http://static1.moritzfuerst.net/kirby/ and http://static1.moritzfuerst.net/kirby/de both show the German localization, the English version (which should say "Home") cannot be accessed.
No? The English version says home (albeit with a lower h, as if the page had no proper title), and the German version says Startseite?
Thanks for checking it out. It seems Safari (12.0.3 on macOS 10.13.6) is somehow to blame (issue persists even after a cache flush), works as expected in Firefox.
However, this
albeit with a lower h, as if the page had no proper title
is weird too, it's capitalized in the content file.
I use Safari myself (12.0.3 on 10.14.3), so I don't think this is a Safari issue.
Does your English text file have the locale extension?
Describe the bug When the root URL is set for the default language in a multilingual installation of Kirby 3.1.0, accessing
/
instead returns the secondary language version.Example: A multilingual installation has
en
set as default language and should be accessible at the root URL of the site:domain.com/
. Therefore'url' => '/'
is set in the language configuration file en.php. The secondary languagede
has no url set and thus defaults todomain.com/de/
. However, accessingdomain.com/
returns thede
localization, noten
(=default).If no url, or an url not
/
is set for the default language, the behavior is as expected.To Reproduce Steps to reproduce the behavior:
'url' => '/'
for the default languageExpected behavior Accessing the home page at
/
should return the default language version of the site.Kirby Version 3.1.0