Download the PHP package heimrichhannot/contao-multilingual-fields-bundle without Composer
On this page you can find all versions of the php package heimrichhannot/contao-multilingual-fields-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download heimrichhannot/contao-multilingual-fields-bundle
More information about heimrichhannot/contao-multilingual-fields-bundle
Files in heimrichhannot/contao-multilingual-fields-bundle
Package contao-multilingual-fields-bundle
Short Description This utility bundle offers functionality for backend editor's to translate arbitrary fields of any table-driven data container in the Contao CMS.
License LGPL-3.0-or-later
Homepage https://github.com/heimrichhannot/contao-multilingual-fields-bundle
Informations about the package contao-multilingual-fields-bundle
Contao Multilingual Fields Bundle
This utility bundle offers functionality for backend editor's to translate arbitrary fields of any table-driven data container in the Contao CMS.
Features
- define which fields of which data containers should be translatable
- adds a button to the backend palette for switching into translation mode
- content elements: optionally add a select field to the backend palette in order to display the corresponding content element only for the selected language
Impressions
The button for editing the languages (right) and the button for showing certain content elements only for the selected
language (left, for tl_content
only)
Editors can specify which of the fields should be translated for which languages
Use case
The use case for this bundle is to have an automatic and structured process for adding translatable fields to a data container. Also, you get a nice and editor-friendly way to edit translations in the backend ;-)
What doesn't the bundle do?
Currently for most data containers this bundle is a utility bundle for just bringing a nice and editor-friendly way to edit translations in the backend. It's up to you how to use the fields.
Besides tl_content there's no out-of-the-box support for contao's frontend modules!
But you can of course use the created fields in your templates (if the modules passes the data there).
How does it work?
The bundle works quite simply: it looks into your project's <project_dir>/config/config.yml
and based on that adds the
fields defined here as translatable fields.
Example: Imagine the following config.yml
(position is the field representing the job of the member in the company):
This would end up in your DCA being automatically modified the following way:
Installation & configuration
- Run
composer require heimrichhannot/contao-multilingual-fields-bundle
. -
Create the file
<project_dir>/config/config.yml
if not already existing and specify your translatable fields: - Clear the project's cache (
<project_dir>/var/cache
). - Update the database. The new fields should be created now.
Insert tags
The following new insert tags are available. These take into account the translated jumpTo url and alias.
Name | Example |
---|---|
{{mf_news_url::<id>::<language>}} |
{{mf_news_url::1::de}} |
{{mf_event_url::<id>::<language>}} |
{{mf_event_url::5::es}} |
{{mf_faq_url::<id>::<language>}} |
{{mf_faq_url::8::en}} |
All versions of contao-multilingual-fields-bundle with dependencies
contao/core-bundle Version ^4.9
heimrichhannot/contao-be_hyperlink-bundle Version ^2.0
heimrichhannot/contao-utils-bundle Version ^2.198
heimrichhannot/contao-request-bundle Version ^1.2