theredcorner / trctranslate
Use the ‘t’ function to output translations.
Package info
github.com/the-red-corner/trctranslate
Type:craft-plugin
pkg:composer/theredcorner/trctranslate
Requires
- craftcms/cms: ^3.0.0-RC1
This package is auto-updated.
Last update: 2026-03-10 00:50:07 UTC
README
Use the t() Twig function to output I18n like strings.
Requirements
This plugin requires Craft CMS 3.0.0-beta.23 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project -
Then tell Composer to load the plugin:
composer require the-red-corner/trctranslate -
In the Control Panel, go to Settings → Plugins and click the “Install” button for TRCTranslate.
Configuring TRCTranslate
- Add a section with the handle
translations. - Add a field with the handle
keyto thetranslationssection. You also have to include thetitlefield for this section.
Using TRCTranslate
Use the following syntax to display a translated string in your templates:
{{ t('footer.address.phoneNumber') }}
footer.address.phoneNumber is the key of the translation entry.
Brought to you by The Red Corner