[TYPO3-dev] switch default language.
Tobias Erlacher
tobi at 54tec.com
Wed Nov 29 10:27:02 CET 2006
> What would it take switch which language is the default language.
>
> Let's say I have a preinstalled site which contains both english and
> german language. English is the default language.
> But I only need the german content. So I need to get rid of the english
> content and make german default language.
I did this by updating the database using the INSERT INTO table SELECT ..
syntax.
As first step i copied the entries for the default language to my new
sys_language_uid.
You have to pay attention that the field l18parent points to the default
translation of the record.
For me this query looked like this, but it depends on your installed
extensions ( i wanted to have a new default language and the contents of
the actual default language as a new language)!
INSERT INTO tt_content SELECT '', pid, t3ver_oid, t3ver_id, t3ver_wsid,
t3ver_label, t3ver_state, t3ver_stage, t3ver_count, t3ver_tstamp,
t3_origuid, tstamp, hidden, sorting, CType, header, header_position,
bodytext, image, imagewidth, imageorient, imagecaption, imagecols,
imageborder, media, layout, deleted, cols, records, pages, starttime,
endtime, colPos, subheader, spaceBefore, spaceAfter, fe_group,
header_link, imagecaption_position, image_link, image_zoom, image_noRows,
image_effects, image_compression, altText, titleText, longdescURL,
header_layout, text_align, text_face, text_size, text_color,
text_properties, menu_type, list_type, table_border, table_cellspacing,
table_cellpadding, table_bgColor, select_key, sectionIndex, linkToTop,
filelink_size, section_frame, date, splash_layout, multimedia,
image_frames, recursive, imageheight, rte_enabled, 3, tx_impexp_origuid,
pi_flexform, uid, l18n_diffsource, tx_templavoila_ds, tx_templavoila_to,
tx_templavoila_flex, tx_templavoila_pito,
zzz_deleted_tx_waprintctrl_prt_ctrl, tx_convert2utf8,
tx_pagephpcontent_php_code from tt_content where sys_language_uid=0
as second step i copied the pages from the pages table to
pages_language_overlay with the new sys_language_uid:
INSERT INTO pages_language_overlay SELECT '',uid, t3ver_oid, t3ver_id,
t3ver_wsid, t3ver_label, t3ver_state, t3ver_stage, t3ver_count,
t3ver_tstamp, t3_origuid, tstamp, crdate, cruser_id, 3, title, hidden,
starttime, endtime, deleted, subtitle, nav_title, media, keywords,
description, abstract, author, author_email, tx_impexp_origuid,'' from
pages
More information about the TYPO3-dev
mailing list