theredcorner / trctranslate
Use the ‘t’ function to output translations.
Installs: 900
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:craft-plugin
pkg:composer/theredcorner/trctranslate
Requires
- craftcms/cms: ^3.0.0-RC1
This package is auto-updated.
Last update: 2025-10-10 00:03:43 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