[TYPO3-english] Swap languages in whole installation

Jan Kornblum jan.kornblum at gmx.de
Thu Nov 12 14:59:29 CET 2015


Dear newsgroup,

i've got a quite adventurous intention ;)

A medium sized website had wrongly been setup with sys_language_uid=0 
to be english, sys_language_uid=1 to be german long time ago. But the 
projects domain is a german top level domain (please don't condemn me, 
it is not my fault)...

Now the customer would like the german content to be default, and 
english content should be located below "domain.de/en".

I'm currently thinking about the following approach: Shouldn't it be 
possible to just swap all sys_language_uid columns values in the 
affected tables? Like this:

# Swap DE to a temporary "3"
UPDATE tt_content SET sys_language_uid=3 WHERE sys_language_uid=1
# Swap EN to "1"
UPDATE tt_content SET sys_language_uid=1 WHERE sys_language_uid=0
# Swap temporary cached DE to "0"
UPDATE  tt_content SET sys_language_uid=0 WHERE sys_language_uid=3

I think this need to be done for "tt_content" and some custom 
extensions tables. For "pages" itself this won't be possible due to 
"pages_overlay", but this replacement might be done manually...

What do you think? Might this still result in a clean installation? Or 
are there any better approaches?

Kind regards, Jan




More information about the TYPO3-english mailing list