Project

General

Profile

Actions

Feature #20014

closed

Page TS option to disable available languages

Added by Xavier Perseguers about 15 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
Start date:
2009-02-13
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:

Description

There is no option to disable a given set of languages to be unavailable in a given subtree. One may already disable languages based on BE groups but not based on a page subtree.

This patch adds an option disableLanguages to pageTS mod.SHARED that allows a set of languages to be removed from the translation page language selector.

Beware: this patch does not work if TemplaVoilĂ  is used as TV creates the language selector on its own. Another patch for TV is available with bug report #9465.

I have a site with multiple languages active, let's say French, German, Italian and English. The situation I have is that I want some languages to be deactivated on some subtrees:

root |-- page1 (no French here) | |-- page1.1 | `-- page1.2 |-- page2 (no German here) | |-- page2.1 | `-- page2.2
`-- page3 (no Italian here) |-- page3.1
`-- page3.2

What I've done with this patch is that I allow disabling (aka removing from the list of possible new translation languages) a comma-separated list of language UID using the standard mod.SHARED pageTS that is already used to set the flag and the name of the default language:

mod.SHARED {
defaultLanguageFlag = en.gif
defaultLanguageLabel = English
disableLanguages = 2
}

This way, I may remove French, German or Italian from the drop-down list of not-yet-available translations in the page list.

This allows me an additional thing as I may now with a bit TS tricking choose another default language for each of these pages 1, 2 and 3. I create four languages in sys_languages, English included, although it is the default language and as such does not need it's own sys_language record. Now I arbitrarily set mod.SHARED.defaultLanguageLabel = Français and set the flag accordingly for this. The editor sees that when he is on page1, the default language is French. Great! But in the drop-down list of translations, I still need to remove the "French" translation as the text was already entered as default language content. And I need the fourth record English in sys_language to allow the default French text to be translated to English.

The rest is just a matter of changing the sys_language_uid in TypoScript and using either sys_language_uid = 0 or 4 (in my case) for the English language if default language is English or another language.
(issue imported from #M10432)


Files

disableLanguages.diff (1.32 KB) disableLanguages.diff Administrator Admin, 2009-02-13 12:35
10432.diff (4.01 KB) 10432.diff Administrator Admin, 2009-03-23 11:34

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #21869: t3lib_tceforms does not respect mod.SHARED.disableLanguagesClosed2009-12-19

Actions
Related to TYPO3 Core - Bug #78801: mod.SHARED.disableLanguages is not respected in tt_content language fieldClosed2016-11-25

Actions
Actions

Also available in: Atom PDF