How to configure TYPO3 to output non-translated pages in default language in the menu - menu

I have two languages:
0: English, example.com (default language)
1: German, example.com/de/
If i visit the german version of the website i want all non-translated pages to appear in English, but with a link to the english page.
If i only set hidePagesIfNotTranslatedByDefault to false, pages don't appear.
If i additionally set fallbacks: '0' in the site config for the language German, pages titles appear in english, but with a link to a german version, e.g. example.com/de/my-page.
But this page doesn't exist and shouldn't exist (even not with content fallback), as that would mean duplicate content.
The goal is to show an all non-translated pages in their default language, with a correct link.
Is there a way to do it?

Related

Kentico custom page url with URL "Path or Pattern" feature

Updated: As I put in the comment under Brenden's response. I think the issue is not related to multilingual site, but it's with using Properties/ URLs / Path or Pattern feature. After adding value to the field Path of Pattern, the whole navigation stops working properly.
I have a multilingual site (English, French). Currently the URLs are like below:
English: www.domain.com/en-us/contact-us
French: www.domain.com/fr-fr/contact-us
What I want for French is a custom (translated) url www.domain.com/fr-fr/contactez-nous
I followed this Kentico instruction - the bottom part of the page with using Path or Pattern by adding /contactez-nous in the box. Things seem ok, but upon clicking on the page with the new URL on the French site, the whole main navigation (done with Hierarchical Viewer) seems to stuck with that URL; clicking anywhere on the nav doesn't do anything.
Links outside the nav works fine. How to make the nav work again. Thanks for your help!
I think I got it. The GetDocumentURL() is using NodeAliasPath to determine the URL. However, if you have not specified the NodeAliasPath column in the Columns property of the hierarchical viewer, then the current page's NodeAliasPath is used - and thus all items have the same URL. Adding the NodeAliasPath to the Columns property should fix the issue, so the hierarchical viewer has access to the data of each individual item.
EDIT: it looks like that in some cases the DocumentURLPath column must be specified too.
Make sure you're testing this in another browser or even another browser in a private window. If you are testing in a new tab in the same window, the CMS caches the selected language in the Kentico UI and shows that in the browser window.
For instance, if you have selected "French" on the pages app in the bottom left under the content tree, then navigate to your site in a new tab, it will display French no matter how many times you change the language selector on your public site to a new language.
Secondly, check the URL aliases for the given pages in each language. Make sure you don't have an alias that is the same in each language. For instance /contact-us with French and /contact-us in English.

ModX - How to edit logo being displayed?

I've got a multilanguage ModX site. And noticed that when changing languages, it displays a different logo. WHat I need to do is to setup same logo for both languages. Basically:
English side showing: logo.png
Other language side showing: logo-new.png
I don't want to replace logo-new.png file with the correct image file on server in case another part of the site uses that file. So I'm left with actually editing the site header to show the correct logo.
When I go to ModX's site template, I see this code for the header:
<img src="[[++site_logo_img]]" itemprop="logo" class="site-logo">
So my question would be, where do I go to edit the ++site_logo_img value?
For web context try to look in system settings, for other contexts in context settings - https://rtfm.modx.com/revolution/2.x/administering-your-site/contexts
[[++site_logo_img]]
This is a MODX setting, these can be found in settings or in context settings.
Lets say you need a different logo for 2 MODX contexts, you can set a site_logo_img different setting in each context.

Display rtl for the whole page for multilanguage using JSF

I built web site using JSF, support multi-language(German and English).
I just set the internationalization values for each language in properties to be use in xhtml. Now I added Arabic language and create lang_ar.properties for Arabic values. It works fine, but the direction is still displayed in the wrong place. Since Arabic is RTL, so when change to Arabic the its should change the direction of the whole content of the page to RTL.
I searched a lot for the solution but I didn't find what I am looking for.
If I use html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ar" dir="rtl">
It will change the direction of the page even if I use German or English. I don't want to use separate page for Arabic content I want use the same pages which take the value from properties files just like English and German, but I need to change the direction when use arabic properties.
If I use the following:
<h:inputText ... dir="#{view.locale.language eq 'ar' ? 'rtl' : 'ltr'}" />
This will works just for the plain text entered in the input field not to the input field itself. So the input field will stay ltr but the text inside will be rtl.
Can any one help me?

Liferay - change locale by page

I have a problem with changing the language in my portal. I use liferay 6.0.5, the default language is French in my portal, and there are some pages translated to English. I set the pages in portal_normal.vm as follows:
# set ($ pages_EN = ["/ services", "/ equipment"])
# if ($ language_id == 'en_GB')
# foreach ($ mypage pages_EN in $)
# if ($ == $ mypage layout.getFriendlyURL ())
# set ($ = $ rtlCssURL themeDisplay.getTheme (). getContextPath () + $themeDisplay.getTheme (). getCssPath () + "/ custom_en.css")
# css ($ rtlCssURL)
# end
# end
# end
I joined the portlet tongue on my portal_normal.vm to change language it works well.
What I want to do: When am in a EN page and I click on a page which has not translated to EN, I want to change the language (en -> fr) then redirect to the clicked link . Any ideas?
As there's no such thing as a "translated page" in Liferay, this is actually hard to answer in a way that will make sense: You might have translated "every article" on a page to a different language, but what will be the behaviour when you have 2 out of 3 articles translated?
The functionality I can imagine will be possible out-of-the-box in Liferay: Given the URLs http://example.com/home, http://example.com/fr/home and http://example.com/en/home, the last ones (with the language code) will show the requested language if that's available. The first URL will show the language that is available and best matches the user's requirement: Either through having stated that one is there preferred language (by being logged in and having set the default language in their profile) or by browser-content-negotiation (you can configure your preferred languages in your browser. This will be carried forward to the webserver)
Another option, that I doubt you speak about here, is that you're speaking about translated page titles, but they will also be covered by the behaviour I mentioned above.
If your scenario is different from that, please rephrase the question. As far as I can imagine what you ask for, I can't think of any requirement for redirects. The language will be chosen automatically based on availability and preferences.

Liferay linking - Langue web content - how to get the url linked the languages

enter code hereIn liferay there is a web content created that handle the Language issue , i didnt used it , i putted an img and want to link it to a language , with 2 images , for 2 langhuae Arabic and english, but what i dont know is the link to this content, as:
<a-href="????"><img srr="..."></a>
where can i get the url that attach me to the needed language...
regards
Well here is the solution we could found.
First of all, the common pattern for this behavior is that the download window was shown when a link was clicked (an anchor).
We changed our href addresses from something like "/web/guest/page-name" to something like "/en/web/guest/page-name" for english, and "/esp/web/guest/page-name" for Arabic.

Resources