Falsche Sprache in der Hovercard
Closed this issue · 5 comments
Wir betreuen eine Website, deren Frontend auf Englisch (en in der Root-Seite der Sitestruktur) eingestellt ist.
Dennoch wird der Link zum Glossar-Eintrag in der Hovercard mit "Weiterlesen" gekennzeichnet.
Wir arbeiten mit
PHP 8.3
Contao 4.13.49
Glossar-Bundle 2.3.2
That's because they are fetched async and take the browser language into consideration.
A person who'll visit the page from outside Germany will get the english translation.
I understand… but that ist irritating for the users.
The website is in english for all visitors. German visitors will now get a mixture of english and german within the hovercrad.
Best is to set the accepted language header to the language of the website with the request. There is already a language option within the config.
Another solution, editing the template is not possible.
The problem: I cannot change the „Weiterlesen“ or „Den Artikel lesen“ within the template, because the URL (i.e. $this->url) is not provided.
Feel free to create a PR for that. I can't say when we'll have time to implement this.
I can add the header in Glossary.js.
But I have no experiences with webpack to build the dist..
But I have no experiences with webpack to build the dist..
All good, I just ran the build and your dist works fine. Thank you a lot