Aktuelles Setup: Deutsch ist die Standardsprache, English Sprache 1, Französisch Sprache 2.
Ziel: Englisch soll die Standardsprache sein und Deutsch die erste alternative Sprache.
Mit folgenden SQL Statements hat es geklappt.
sys_language_uid der Deutschen Inhalte ändern (von 0 auf 10):
update tt_content set sys_language_uid=10 where sys_language_uid=0;
sys_language_uid der Englischen Inhalte ändern (von 1 auf 0):
update tt_content set sys_language_uid=0 where sys_language_uid=1;
sys_language_uid der Deutschen Inhalte ändern (von 10 auf 1):
update tt_content set sys_language_uid=1 where sys_language_uid=10;
l18n_parent neu setzen für die Deutschen Inhalte:
UPDATE tt_content as c1 RIGHT JOIN tt_content as c2 on c2.l18n_parent=c1.uid SET c1.l18n_parent=c1.uid,c1.t3_origuid=c1.uid WHERE c1.sys_language_uid=1 AND c2.sys_language_uid=0;
uid ändern bei allen Deutschen Inhalten (> als grösste aktuelle Content ID!):
UPDATE tt_content as c1 RIGHT JOIN tt_content as c2 on c2.l18n_parent=c1.uid SET c1.uid=c2.uid+10000 WHERE c1.sys_language_uid=1 AND c2.sys_language_uid=0;
uid der Englischen Inhalte ändern auf die Id der ehemals Deutschen Inhalte:
UPDATE tt_content SET uid=l18n_parent where sys_language_uid=0 and l18n_parent>0;
uid der Deutschen Inhalte wieder ändern
UPDATE tt_content SET uid=uid-10000 where sys_language_uid=1 and uid>10000;
Clean up
UPDATE tt_content SET l18n_parent=0,t3_origuid=0,l18n_diffsource='' where sys_language_uid=0 and l18n_parent>0;
Und bestimmte Felder überetragen:
UPDATE tt_content as c1 RIGHT JOIN tt_content as c2 on c2.l18n_parent=c1.uid SET c1.hidden=c2.hidden, c1.starttime=c2.starttime, c1.endtime=c2.endtime WHERE c1.sys_language_uid=0 AND c2.sys_language_uid=1;
Das Script funktioniert nur, wenn nicht mehrere datensätze gelöscht und wieder übersetzt wurden. Er meckert sonst, dass es einen duplicate entry gibt.
AntwortenLöschenDeshalb haben wir vorher alle gelöschten Datensätze endgültig gelöscht mit:
delete from tt_content where deleted = 1;
I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Typo3, kindly contact us http://www.maxmunus.com/contact
AntwortenLöschenMaxMunus Offer World Class Virtual Instructor led training on Typo3. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
For Demo Contact us:
Name : Arunkumar U
Email : arun@maxmunus.com
Skype id: training_maxmunus
Contact No.-+91-9738507310
Company Website –http://www.maxmunus.com