if you view a page where no catalan version is available TYPO3 shows menu title and pagetitle of defaultlanguage and only the content in spanish. (What is far from perfect and not the expected behaviour)

Solution:- It is neccessary that other functions in the core know a fallbackorder.- especially the function t3lib_page::getPageOverlay needs to know alternative fallback language uids.

I recommend to introduce a new configuration: config.sys_language_fallBackOrder=1,0(which is used as general fallbackorder)

Attached a patch with the following changes:t3lib_page:1) new function getLanguageOverlayUidForPage($page_id,$fallBackOrder)(function that checks which page record overlay language should be used, according to the given fallbackorder)2) adjust getPageOverlay to use fallback uid instead of default

I used: config.sys_language_mode = content_fallback; 1,0Why did you change this config to config.sys_language_fallBackOrder=1,0I expected the patch to do the same thing as typo3 should do. So I used the normal config.Now it's working.

Its because the sematic differenceconfig.sys_language_mode = content_fallback; 1,0

controls the content fallback, and the fallbackorder is not implemented in a way it could easy be used for a common fallback order.

I my opinion having that common config parameter is more clear. (It changes not only content behaviour - which can also be set to something diffrent than content_fallback - but changes common language fallback)

your patch is perfect, thank you. I played around with it for quite some time now. There remains only one problem with realUrl. The text in the Url still has not the correct language fallBackOrder. Is there a solution to this?

I just test your extension: languagevisability - it seems to work fine so far, but the bug described here is not resolved, is it? Or is there a special TypoScript Configuration necessary to resolve this bug?

And it seems not possible to install that extension together with the patch you proviede here: T3X_danp_languagefallback_patch-0_0_0-z-200708151515.t3x

Schould this patch not be integrated in your extension languagevisability? Am I getting something wrong?

Daniel, can you update the patch for TYPO3 4.2 please? Additionally, please check my patch in #19114.It seems to work quite different than the solution that you have come to. What it basically does is the provide content-fallback even if the page record has been translated, but not all content on it.

According to the docs menu and page title should be translated as well when content_fallback is in use. This means that the page record and $TSFE->sys_language_uid should be set to a fallback language. Indirectly this is confirmed by TSRef in the description of sys_language_uid:

<blockquote>Internally, the value is depending on whether a Alternative Page Language record can be found with that language. If not, the value will default to zero (default language) except if “sys_language_mode” is set to a value like “content_fallback”.</blockquote>

and

<blockquote>The system will always operate with the selected language even if the page is not translated with a page overlay record. This will keep menus etc. translated</blockquote>

So the patch checks if the fallback is set and changes page record and sys_language_uid to be the one from fallback, which makes the behavior identical to described in TSRef.

Result: menu in the fallback language, page title in the fallback language, links still stay with user's choosen language.

One possible drawback could be with language selectors. If they use $TSFE->sys_language_uid, they will show a fallback language. Instead they should use the value of "L".

While danp_languagefallback_patch adrresses the issue the patch from Dmitrij does not at all.

The main problem is not translation of the currently selected page record (while in content_fallback mode), but rather falling back while translating menu items for other pages which are present in the menu.

Dmitrij's patch works only with currently selected page, while danp_languagefallback_patch reimplements getPageOverlay which actually provides menu biulding class with translated page records.

I have written a small patch for the site [[http://www.ashtangayoga.info/]] last week that consideres the configured content_fallback setting for pages too. Furthermore it introduces a new API method to overlay other non-page records with a possible fallback, but you must modify the necessary extensions yourself. It's already done for the core and so that stuff should already work in most cases. Just have a look at the patch for more details. Feedback is welcome and maybe this simple patch or a modification of it can be submitted to Gerrit sooner or later.

meanwhile I tested Dmitrys patch - It solves the main problem with non translated navigations, but there are strange side effects I can`t discribe.I will give your patch shortly a try - would be great to see this in core.

I marked #20623 as a duplicate of this one and will submit the patch to Gerrit for 4.8 only (and 4.5/4.6 backports afterwards if Ernesto/Xavier want it) in some days to get some more feedback and practical results as the patch is already running in a live installation. Thanks for your review! :-)

I fixed a possible edge-case in the patch and will upload this to one to Gerrit now. Please review it again carefully, just to be sure that nothing else slipped in and don't forget voting in Gerrit. Thanks in advance! :-)

I attached the new version of the patch directly taken from Gerrit by using the patch command. To get such a patch by yourself, you just need to clone the git repository of TYPO3 and execute one of the mentioned commands below a patchset in Gerrit on the sources.

Your extension does lot's of more stuff and that's exactly the problem. Also I didn't understood the code and it didn't worked for me like I had expected it (just install it, define the fallback order and go).

Hi together. Just tested the patch on a page with > 40 languages (on a patched 4.7.2). Works fine so far.But it seems that it ignores l18n_cfg setting (2) in page-record (Hide page if no translation is available). So I don't have any chance to explicitly hide certain pages that I don't want to show in fallback.

Hi together. Just tested the patch on a page with > 40 languages (on a patched 4.7.2). Works fine so far.But it seems that it ignores l18n_cfg setting (2) in page-record (Hide page if no translation is available). So I don't have any chance to explicitly hide certain pages that I don't want to show in fallback.

That one should be patched in t3lib_page imho... Thanks :)

Hi all,we applied the patch set 21 to our 6.2 installation, but we also had the problem, that it ignores the l18n_cfg setting as mentioned above.

To fix this(at least for the basic HMENU) we changed line number 975 in the file typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php.

There is a patch under review. Maybe that works for you? But it was mentioned in the review that somebody still had an issue with it. And currently it seems to be handled as a "feature" (won't have this for 6.2 then unfortunately) and not as a bugfix.

OK I used the patch command. First it looks ok. But RealURL returns also a bad URL and another Extension provides also the wrong title. In this https://forge.typo3.org/issues/18062 Issu is said, that RealURL expects the correct Lang-Param from core.

Am I the only one with this problem? I meen in many multilanguage pages I think they would have different fallbacks for different languages (austria -> german, us -> uk etc.).

Are there experiences with other extensions? And will this patch include in the Core maybe? Thanks a lot for support.

I found a fix, but realurl can't handle the resulting urls with fallback names inside them. The root cause is that sometimes getPageOverlay is called with an explicit language parameter and this means to the function that the user want's exactly this language. Changing this behaviour will automatically be a breaking change.

To handle RealUrl I translated every page. So the title of the page is correct and also the URL. My last problem is with Gridelemnts. When I have an element inside of antother element the fallback is the default language. Other elements are shown correct in the fallback language.

We experienced confusing behavior with language handling as well. We collected and refined patches from different sources and now we have a system that works for us. We have tried this with TYPO3 6.2.12, 6.2.15 and 6.2.27 (I have attached the changes to TYPO3 6.2.12 and 6.2.27).

Use config.languageFallbackChain in the TS setup (f.e. config.languageFallbackChain = 2)

We are not sure, if our patch fixes all the mentoined requirements, but it solves our problems with ts-menues and content elements (also of several plugins) with the language-fallback problems

If anyone is interested in the full modified TYPO3 6.2.15 or 6.2.27 core, write to contact@gridds.com (free, no support).

This issue is valid but the current pending patch hasn't be touched in a long time and isn't going to get merged. That's why I'm changing the issue state back to accepted. This issue has to be part of our broader review of localization / language handling in TYPO3 which is why I changed the category.