Bug #32590

Default language is always English

Added by Soeren Kracker over 8 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Must have
Target version:
-
Start date:
2011-12-15
Due date:
% Done:

100%


Description

At the moment it is not possible to translate to English using xml files when you've set up another default language than English.

In my setup German is default language (uid 0), English (uid 1), Spanish (uid 2). I always get default translations when requesting translations for English (uid 1). Spanish and German work properly.

I wonder how such change could be made without making a big announcement or was it just forgotten?

constants.ts - constants (258 Bytes) Soeren Kracker, 2012-01-19 10:04

main.ts - setup (1.09 KB) Soeren Kracker, 2012-01-19 10:04

translations.xml View - translations.xml (508 Bytes) Soeren Kracker, 2012-01-19 10:04

History

#1 Updated by Soeren Kracker over 8 years ago

Just tested with a fresh 4.6 install. The error is there too. See attached my constants, setup and the translations.xml file that are used.
When using lang.en in typoscript the english translation is displayed. Using the xml file for translations doesn't work for English (but for Spanish!). The german text is displayed instead of English.
Obviously when parsing xml default language is always English, regardless what you have set up.

#2 Updated by Soeren Kracker over 8 years ago

Guess the problem is in t3lib/l10n/class.t3lib_l10n_factory.php in function getParsedData

Lines 88+89:
// English is the default language
$languageKey = ($languageKey === 'en') ? 'default' : $languageKey;

Imho there should be a check which language has been set as default language. When I change en to de everything works as expected and as it did in 4.5

#3 Updated by Dominique Feyer over 8 years ago

  • Status changed from New to Closed
  • Assignee set to Dominique Feyer
  • % Done changed from 0 to 100

It turned out that it was a configuration problem and the incorrect configuration worked in TYPO3 < 4.6, but the correct behaviour was enforced in 4.6.

Reporter says it can be closed

#4 Updated by Riccardo De Contardi almost 8 years ago

Hello
I think I have the same problem with TYPO3 4.7... may I ask you to post the correct configuration aforementioned?

Thank you very much and sorry for the bothering
Best Regards

#5 Updated by Soeren Kracker almost 8 years ago

Riccardo De Contardi wrote:

Hello
I think I have the same problem with TYPO3 4.7... may I ask you to post the correct configuration aforementioned?

Thank you very much and sorry for the bothering
Best Regards

English is always the default language when using xml translations, even though you've set another language as default in the backend.
I setup my german text under key "default", and english text under key "en". Correct configuration is english text under "default" and german under "de".

#6 Updated by Dominique Feyer almost 8 years ago

  • Status changed from Closed to Accepted

I reopen this issues, we will do more test on this problem.

Please can you give us more information, about your setup.

#7 Updated by Dominique Feyer almost 8 years ago

  • Assignee changed from Dominique Feyer to Xavier Perseguers

#8 Updated by Xavier Perseguers over 5 years ago

  • Status changed from Accepted to Resolved

#9 Updated by Genoveva Mitrea about 5 years ago

Hello,
I have the same problem using Typo3CMS version 6.2.11. German is my default Language, English is displayed, but French and Italian pages are displayed in German.
The translations look OK.
What is to be done to view the Italian and French pages.
Thanks for your help.

#10 Updated by Xavier Perseguers about 5 years ago

Please ask for support in the English Mailing List: https://forum.typo3.org/index.php/f/10/

Also available in: Atom PDF