I have a website with two languages e.g de and en. De is my default language with no path prefix. En, the second language, has /en/ as prefix in the url. Now when I switch to th
There is a open bug related to content fallback:
https://forge.typo3.org/issues/86762
Maybe try upgrade to 9.5.3 (Dont know if this is fixed there).
As a workaround: Do you want to remove not translated pages in the english menu?
Then you can set for all pages "Hide page if no translation for current language exists". This checkbox is available for every page under the tab "language".
To do this for all your existing pages:
UPDATE pages SET l18n_cfg = 2
To automaticly set this flag for new created pages: Create a overrides pages.php in your extension.
typo3conf/ext/[YOUR_EXTENSION]/Configuration/TCA/Overrides/pages.php
And add the default value for l18n_cfg
$GLOBALS['TCA']['pages']['columns']['l18n_cfg']['config']['default'] = 2;
Another workaround instead of creating translations for every page is to create static routes. For example:
route: de/english-slug-of-page
type: uri
source: https://yoursite/english-slug-of-page.
Not very handy solution though. And it has the disadvantage that routing to the English pages will change the selected language (in the example from German to English).
The is still no fix for this issue in TYPO3 9.5.4.
This here should be a comment to the answer from Steffen Mächtel but i dont have the enough reputation -.-.
If you want archive that all pages are hidden(inside menus) when there is no translation, you can set a global setting under Module Settings -> Configure Installation-Wide Options -> [FE][hidePagesIfNotTranslatedByDefault] (< TYPO3 9 you will finde the same setting in the install tool). This way is a bit simpler :)