sgalinski / languagevisibility
Language Visibility & Fallback Control - Control TYPO3 frontend language visibility and fallback behavior with flexible TypoScript-based configuration.
Package info
gitlab.sgalinski.de/typo3/languagevisibility.git
Type:typo3-cms-extension
pkg:composer/sgalinski/languagevisibility
Requires
- typo3/cms-core: >=14.3.0 <=14.3.99
This package is auto-updated.
Last update: 2026-08-14 23:45:52 UTC
README
License: GNU GPL, Version 2
Repository: https://gitlab.sgalinski.de/typo3/languagevisibility
Configuration
Use this TypoScript code to set up your language behavior in the FE:
config.sys_language_mode = ignore
config.sys_language_overlay = 1
//normal language configuration:
config.sys_language_uid = 0
config.language = en
config.htmlTag_langKey = en
config.locale_all = en_GB.utf8
//deutsch
[globalVar = GP:L=1]
config.sys_language_uid = 1
config.language = de
config.htmlTag_langKey = de
config.locale_all = de_DE.utf8
[global]
...
Use languagevisibility for own records
There are 3 steps to take:
- Extend your table with the required field and TCA
- Register your table to the languagevisibility core
- Use the correct code so that the desired functionality happened
1. Extend your table
Add this definition to your table TCA configuration:
'tx_languagevisibility_visibility' => [
'exclude' => 1,
'label' => 'LLL:EXT:languagevisibility/Resources/Private/Language/locallang_db.xlf:pages.tx_languagevisibility_visibility',
'config' => [
'type' => 'text',
'renderType' => 'languageVisibility',
]
];
The text type lets TYPO3 derive the required LONGTEXT database column from TCA. The custom
languageVisibility render type continues to render the visibility controls.
2. Register your table
Use the existing registration Hook :
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['languagevisibility']['recordElementSupportedTables'][<table>]= [];
(this will handle your table like a default record element. If you need more control you can also register your own visibility element class)
Note
If you want to access the data directly with the Doctrine Querybuilder, you need to add the following code manually, if the languagevisibility matters:
if (FrontendServices::isSupportedTable($tableName)) {
if (FrontendServices::checkVisiblityForElement($row, $tableName, $languageUid)) {
return;
}
}