Generate links without en when target page has no translation - typo3

I have a page which is partly translated. Default is German, translation is English. Now I have the problem, that all links generated with typolink or menus have an English domain part (www.domain.de/en/pagename) no matter if it is translated or not. When I click on it, I see the German content. The wish is, that if there is no translation of the target page, the link shall generate without the "en". How can I achieve that?
I tried with
config.sys_language_mode = default
but had no success. The description of this setting sounded like it could be the answer.
I have realurl here and TYPO3 4.6 (I know it should be updated, but not in my hand).

If found the solution myself.
The magic was the property
protectLvar = all
in the HMENU object. See also description in tsref https://docs.typo3.org/typo3cms/TyposcriptReference/4.7/ContentObjects(cobject)/Hmenu/Index.html

Related

How to set up multiple languages in Typo3 correctly?

this may be a noob question - but I hope to get an answer from an experienced person,
because we have to switch our settings and would like to do it correctly the first time.
At the moment the default language is set to German. English is defined as another language.
When somebody from France looks at the website, it is shown in German first, he then has to switch to english manually. For an english visitor everything is fine.
So what should we do:
1) Set the default language to english and have german as second language? What about guys from Switzerland, Luxemburg, Liechtenstein and Austria then. Do these have to be defined seperately as they are also seperately selectable as windows languages?
2) Is there an option to simply say: Every visitor that is not german speaking should get the english website in default? And even in this case, will this then recognize the different german options explained in 1?
Sorry if these questions are stupid. ;-)
Thank you,
Fabian
Your aim is to change how visitors see the website, but your are asking how to change the editing of the website accordingly. Luckily it is a CMS and you can separate those concerns.
What you seem to look after is a component that analyses the IP/language/browser properties of the visitor at first page load and that there are rules what to show (e.g. show English version except your mentioned countries). There are extensions for that specific purpose like https://extensions.typo3.org/extension/locate or others: https://extensions.typo3.org/?L=0&id=1&tx_solr%5Bq%5D=language
That way you don't need to change the default at all.

TYPO3 - Translations set but neither processed nor displayed

I've been building a TYPO3 website. I wanted to use the multi-language capacity of TYPO3 and get acquainted with the CMS. I'm using V.9.5.6 at the moment with the Introduction Package.
I followed the manual on multi-language setup here : https://docs.typo3.org/m/typo3/guide-frontendlocalization/9.5/en-us/Index.html
When switching languages, the page refreshes but no visible changes occur.
I deleted the original "German" et "Dansk" languages, then added "French" and "German". I used the contact page as proving grounds.
I added translations in germand and french from the original english page I built. There's only a header and a contact form. In english, it reads "contact form". In german and french it should read respectively "Kontaktieren Sie uns" and "Contactez-nous".
The languages UIDs are 2 for German and 3 for French. The template, in the languages section, has "auto" for the list of languages and it pulls correctly the 2 I added, in the correct order.
In a properly setup website, if default language is English, and I click on the "German" or "French" language button at the bottom, the page should refresh and display the content translated in the language I selected and have the selected language in bold at the bottom of the page.
When clicking on the bottom links, it adds the correct L= parameter and the page loads but no visible change occur on the page. Even the language link at the bottom of the page has "Default" in bold instead of whatever I clicked.
There is NO error message when clicking on the language buttons.
I'm pretty sure this is not the standard behavior of a TYPO3 multi-lingual installation. What can cause the CMS to not fetch a translated content OR fail to get the language change information from the parameters passed in the URL ?
I'll try to answer this vague question.
Usually there are three pitfalls you should look at:
realurl (or routes in v9) here is a nice gist: https://gist.github.com/koehlersimon/9dcbabb6b1b2adcbc84db96fd144fb08
TypoScript settings for the languages: https://docs.typo3.org/m/typo3/guide-frontendlocalization/9.5/en-us/TyposcriptConfiguration/Index.html#typoscript-configuration
proper .htaccess in connection with [1.]
I also suggest to update to v 9.5.9
There have been plenty bugfixes since v 9.5.6 and updating within branch 9.5.X is really easy and non-breaking!

Adding Templavoila template to Typo3 blog

I am pretty new to Typo3, and I am sorry if my question is too easy to answer =)
I'm using Templavoila and I installed the Typo3 Blog extension (T3G?) and I ticked the checkbox "Install and use the template provided by the extension" when setting up my first blog. I hardly managed to get a html only page with a sidebar and list of posts.
My problem is that I can't find a way to add a template or any CSS to that page. I'd like to fit it into the rest of my website with the logo, menu, etc… but after a day of searching and reading, I haven't find a solution to my problem.
Is the problem that I'm using Templavoila rather than FLUID?
Is there a way to add a TV template to my blog?
How can I add CSS to that page (I have tried page.includeCSS.style without success)?
Is it possible to fit that blog in the rest of the website?
I'm using : Typo3 7.6 - Typo3 Blog 7.6 - Templavoila! Plus 7.2
PS : Is it just me or is it pretty difficult for new people to make their way into Typo3 ? ^^ I'm probably just missing something obvious but there isn't much documentation or tutorials dedicated to beginners. I hope it get's easier =)
Templavoila (and Templavoila plus) operate its "magic" by its function to show the content; thus you don't need anymore the usual TypoScript:
page.10 < styles.content.get
Instead, the page content must be replaced with:
page.10 = USER
page.10.userFunc = tx_templavoilaplus_pi1->main_page
Be sure to enable the TemplaVoila page module to manage content with TemplaVoila.The reason is that the "bare" TYPO3 uses the colPos field to retrieve the content (e.g. styles.content.get means colPos=0) while as far as I remember TemplaVoila uses its own logic and the TemplaVoila page module is necessary (also, as far as I can remember,there is an option to map a TemplaVoila content container to the colPos but I could possibly be wrong).
This is only part of the answer I was looking for, and it was probably obvious (well not for me indeed).
In the options of the blog template (the Typoscript one) I had to uncheck all the checkboxes (Clear constants, clear setup, rootlevel).
I also deleted the page.10 < styles.content.get, if I don't I get all the content but again, HTML only.
I'm facing a new problem now. The list of posts is not showing. Only regular element like text elements are being displayed, the Templavoilà FCE aren't… It is worse for the blog posts, nothing at all is being displayed.
PS : Should I write a new question for this or is it okay to ask it here ?
as maintainer of the TemplaVoilà! Plus extension I'd like to help you. Till yet, I didn't tested the blog extension, but I'm willing to help you there.
Couls you please fill an issue report on https://github.com/pluspol-interactive/templavoilaplus/issues and add there a link to this discussion?
Thanks
PS: I know, this isn't a answer to the question, but not enough reputation to add a comment.

TYPO3 multilanguage concept

I need to create two pages trees, each for specific language (not use additional language pages). In my case two pages trees - two languages (German and English). German language shall be by default.
In url language must be added after domain via "/" like this:
http://www.example.de/de or http://www.example.de/en
Can someone suggest me how I can do this? Please attach some typoscript templates and especialy realurl configuration files.
Earlier I have read on some forums that in this way you can't organize multilanguage website. Is it true? Please give me an advise. I would be very thankful.
Thank you in advance.
According to my experience and knowledge this is not possible with default TYPO3 configuration options.
A idea from be would be to use two sub-trees within the pagetree for example.de
In one sub-tree you have all german pages and in the other sub-tree you have all english pages.
The startpage (rootpage) of this domain is then the only page that is translated normally. On this page the links and menus are configured to point to the right tree based on the current language...
But i advice you to just create a subdomain en.example.de and configure it with its own tree and rootpage. Especially if you are a beginner, this will make live more easy for you!
Thank you so much. This is enough information for me about multilanguages in TYPO3.
I tried to do it like this:
Root page (shortcut to Deutsch)
English (shortcut to Home)
Home
...
Deutsch (shortcut to Startseite)
Startseite
...
But in this case realurl told me something like this (don't remember): Path "startseite" is not in postVarSet.
FYI: I'm not beginner in TYPO3, just didn't develop multilanguages projects before.

Create "multilanguage" site without redundant text in typo3

I'm not a big typo3 expert nor have I access to typoscript options at the typo3 instance I'm working with (It's a very big site and I don't have the authorization to do so). So I hope this question fits on stackoverflow (Please don't hate me if it does not, I'll happily post this on another site)
What I'm trying to achieve is:
My website has two possible translations (German and English). I see
that it's possible to switch languages during surfing through
clicking the "German"/"English"-Button
On the website are also informations about our staff (who may not be speaking german)
If one staff member doesn't speak german, I copy redundantly their english profile on the german translation mode (that it appears, because otherwise it doesn't - might be no good style, but it's better than not having them appear at all)
I'm not happy with these kind of redundancy since it means that I have to do the same action twice on the exactly same content. Does there exist a possibility in the backend of typo3 where I can set that the german translation shall be the exact same as the english content?
I hope my question is clear, thanks a lot for your help.
As you say you don't have access to typoscript templates etc, I guess you are not an integrator/developer in this project, but an editor.
Your only way to achieve an automatic "fallback" behaviour is asking the person who takes care of the site's configuration to set that up for you.
But if that's not possible, you can still use the "insert records" content element (german: "Datensatz einfügen") to avoid duplicate entries.
This content type is not in the wizard when you create a new content element. But you can create a text element and then change the type to "insert records". Now you can select another record which is then mirrored here:
You'll have a similar amount of work when setting it up, but you won't have redundant text, which is way better.
If this content type isn't available either, I would insist on the administrator enabling it for editors - it's very useful to maintain a site's content healthy.
Would be helpful to see your TypoScript configuration. Maybe theres something wrong with the sys_language_mode. Given that the sys_language_uid of english is 0 (which means its default language) and german is 1, the default behaviour should be, that german translations are shown, if available. If a translation is not available the default version of a content element is shown. However, you can change this behaviour with Typoscript:
config.sys_language_mode = content_fallback ; 5,3,1
This will set the content fallback of an content element (which is triggered if no translation exists) to sys_language_uid 5, if its not available in that language sys_language_uid 3 will be displayed etc.
Maybe your installation is set to
config.sys_language_overlay = hideNonTranslated
This will hide non-translated content-elements. Remove this entry to enable content fallback again.
You can always check the current Typoscript in the Template module via the TypoScript Object Browser. However, to really get help you need to share your TypoScript language configuration. The behaviour you describe is not the default behaviour, so its configured somewhere.