Translated Checkbox
The “Translated Checkbox” attribute is the multilingual variant of the
Checkbox attribute. It stores a separate boolean
value (0 or 1) per language. The values are stored in the dedicated translation table
tl_metamodel_translatedcheckbox.
Typical use cases:
Language-dependent publication (e.g. published in German, not yet in English)
Yes/No fields that can be set differently per language
See also
The monolingual variant of this attribute is described under Checkbox.
See also
Information on multilingual support in MetaModels can be found on the Multilingual Support in MetaModels page.
Installation
The attribute is installed via the Contao Manager or Composer:
composer require metamodels/attribute_translatedcheckbox
Settings when Creating the Attribute
In addition to the general attribute settings (name, column name, description, override variants), the translated checkbox attribute offers the following specific options:
Option |
Description |
|---|---|
Toggle icon |
Adds an additional icon (“eye”) in the backend list view to toggle the status
directly (language-dependent). The column name |
Inverted display option |
Reverses the toggle icon status: an active checkbox (value |
Custom icon |
Enables the selection of custom icons. Unlike the monolingual variant, the icons can be set separately per language (multi-column wizard with language selection, active icon, and inactive icon). |
Settings in Render Settings
In the attribute list of a render setting, the usual options are available:
Option |
Description |
|---|---|
Template |
Selection of a custom template for the output of the checkbox value. If no template
is specified, the output is plain text ( Primarily for list display in the backend, the template |
CSS class |
Optional CSS class added to the output element. |
Settings in the Input Form
When the attribute is added to an input form, the following options are available:
Display
Option |
Description |
|---|---|
Backend class |
CSS classes for the display (e.g. |
Template for backend |
Selection of a custom widget template for the backend form. |
Template for frontend |
Selection of a custom widget template for frontend editing (only available if the “Frontend Editing” extension is installed). |
Functions
Option |
Description |
|---|---|
Required field |
Makes the field a required field. |
Submit on change |
The input form is reloaded via Ajax when the checkbox is toggled
( |
Overview (backend filter)
Option |
Description |
|---|---|
Filterable |
The attribute is available in the backend as a filter criterion. |
Filter Rules
Filter rule |
Note |
|---|---|
Translated checkbox status |
Checks whether the checkbox value in the active language is equal to |
Special Functions
Database storage
The values are stored per language in tl_metamodel_translatedcheckbox
(fields: att_id, item_id, langcode, value as char(1)).
No column is created in the MetaModel table.
Language-dependent icons
The custom icons for active/inactive can be chosen differently for each language version — e.g. a DE flag for the German and a GB flag for the English publication.
Fallback language
If a value is missing for a language, MetaModels falls back to the fallback language.
IDs without a value in the fallback language are treated as inactive ('').