Project

General

Profile

Actions

Feature #20014

closed

Page TS option to disable available languages

Added by Xavier Perseguers almost 16 years ago. Updated about 8 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 #1

Updated by Steffen Kamper over 15 years ago

committed to trunk, rev 5217

Actions #2

Updated by Bernhard Eckl over 11 years ago

  • Target version deleted (0)

This is not complete, if I edit a content element I still can choose the disabled language (l18n parent field). How about a condition which checks disableLanguages and shows only the others in the dropdown menu?

Actions #3

Updated by Chris topher over 11 years ago

  • Subject changed from Page TS option to disable avaiable languages to Page TS option to disable available languages
  • Status changed from Resolved to New
Actions #4

Updated by Mathias Schreiber almost 10 years ago

  • Category set to Backend User Interface
  • Target version set to 7.4 (Backend)
Actions #5

Updated by Susanne Moog over 9 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #6

Updated by Benni Mack about 9 years ago

  • Assignee deleted (Steffen Kamper)
  • Target version changed from 7.5 to 8 LTS
Actions #7

Updated by Tymoteusz Motylewski about 8 years ago

  • Status changed from New to Closed

created a proper bug report.
This feature can be closed now.

Actions

Also available in: Atom PDF