Hey Kast.

I wrote some kind of explanation a view months ago -- but I did it in German.
http://old.nabble.com/Re%3A-Nachtraegliches-aendern-der-Defaultsprache-p31108992.html
Because your example names German as former default language, maybe you know 
German.


As Jigal said, there is no simple way of switching default the language because 
of the database layout. There are "default language records" and "translation 
records of default language records". Translations know the default language 
records they are a translation of.

Imagine you have a default language and two translation languages A content 
element "1" is a default one, the content elements "2" is its German 
translation, the content element "3" its Italian translation.
Switching default and German language would require
* Switch 2 to be default language (easy to reach)
* Make 2 forget being translation of 1 (easy, too)
* Switch 1 to be German translation (easy)
* Make 1 being translation of 2 (not so easy)
* Make 3 being translation of 2, too (not so easy, too)


Another thing is translated XML data. The "flex" structure allows having 
records being responsible for "all languages". Those have XML data in them 
(like the pi_flexform of tt_content, despite exactly this one is *not* 
XML-translated) where one XML string contains all language strings. Inside this 
XML string, everything possible with TCA can happen.


It's possible, but it's not an easy database transaction. I think it requires 
kind of a database reorganization service.
If you want to implement something, I would suggest to do it by CLI. As it 
requires to potentially touch each and every database table, it should be done 
with some kind of chunking to avoid being stopped by CPU time or memory 
limitation. This would result in a totally broken database.
Flipping the "plain database stuff" can be done be reading every record into 
the PHP memory, creating kind of a UID mapping table and pushing some huge 
update commands to the database.
Flipping the XML translation is much harder. Therefore, you have to change 
strings inside the database by reading a record from the database, decode XML, 
change XML structure, encode XML and write the record back to the database.


Regards,



Stephan Schuler
Web-Entwickler

Telefon: +49 (911) 539909 - 0
E-Mail: stephan.schu...@netlogix.de
Website: media.netlogix.de


--
netlogix GmbH & Co. KG
IT-Services | IT-Training | Media
Andernacher Straße 53 | 90411 Nürnberg
Telefon: +49 (911) 539909 - 0 | Fax: +49 (911) 539909 - 99
E-Mail: i...@netlogix.de | Internet: http://www.netlogix.de

netlogix GmbH & Co. KG ist eingetragen am Amtsgericht Nürnberg (HRA 13338)
Persönlich haftende Gesellschafterin: netlogix Verwaltungs GmbH (HRB 20634)
Umsatzsteuer-Identifikationsnummer: DE 233472254
Geschäftsführer: Stefan Buchta, Matthias Schmidt



-----Ursprüngliche Nachricht-----
Von: typo3-english-boun...@lists.typo3.org 
[mailto:typo3-english-boun...@lists.typo3.org] Im Auftrag von ktt
Gesendet: Mittwoch, 3. August 2011 00:20
An: riccardo.deconta...@bhuman.it; TYPO3 English
Betreff: Re: [TYPO3-english] Changing default language in Templavoila

I would like to switch languages in content tables.
Let's say previously default language was German, and English was just a 
localisation of it in tt_content. If I set English as default language in TS or 
in User settings(or both) it still remains as localisation in content tables. 
These positions do not change. Even if I delete a second language from root.

--- On Tue, 8/2/11, Riccardo De Contardi <riccardo.deconta...@bhuman.it> wrote:

> From: Riccardo De Contardi <riccardo.deconta...@bhuman.it>
> Subject: Re: [TYPO3-english] Changing default language in Templavoila
> To: typo3-english@lists.typo3.org
> Date: Tuesday, August 2, 2011, 1:06 PM I'm not sure I've understood...
> do you want to change the language of the backend interface?
>
> If so, use extension manager > translation handling to retrieve the
> languages you want (select, save selection && check status against
> repository && update from repository)
>
> Then, in User tools > user settings > Language
>
>
> --------------------------------------------
> Riccardo De Contardi – TYPO3 Certified Integrator B Human Srl -
> www.bhuman.it <http://www.bhuman.it> Via Canzio, 15 - 20131 Milano TEL
> +39-02-20.23.271 - FAX +39-02-20.240.561
> --------------------------------------------
>
> Il 02/08/11 09.44, ktt ha scritto:
> > Hello,
> >
> > How to change default language in Templavoila?
> > I did changes in TS template -
> >
> > config.sys_language_uid = 1
> > config.locale_all = en_GB.UTF-8
> > config.language = en
> >
> > Previous was German L=0.
> > But German still appears as main language in backend, and English
> > being shown as localisation.
> > In frontend everything works ok.
> >
> > Thank you in advance,
> > Kast A.
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english@lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>
_______________________________________________
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
_______________________________________________
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Reply via email to