PHPackages                             triveon/translate-custom-variables - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. triveon/translate-custom-variables

ActiveMagento2-module[Localization &amp; i18n](/categories/localization)

triveon/translate-custom-variables
==================================

A module to use custom variables in translatable CMS strings

1.1.1(2y ago)04OSL-3.0PHPPHP &gt;=7.3

Since Dec 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/triveon/translate-custom-variables)[ Packagist](https://packagist.org/packages/triveon/translate-custom-variables)[ RSS](/packages/triveon-translate-custom-variables/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)DependenciesVersions (3)Used By (0)

Translate Custom Variables Magento 2
====================================

[](#translate-custom-variables-magento-2)

This is the official Translate Custom Variables Magento 2 extension. With this module it is possible to use custom variables in translatable strings in CMS elements.

How does it work?
-----------------

[](#how-does-it-work)

1. For example, you have a custom variable with code free\_shipping\_cost, and you want to place it in a translatable string in a CMS Block or CMS Page
2. To do this, the prefix "customVar\_" must be placed before the custom variable code in the translation string
3. As: {{trans "Free Shipping from %free\_shipping" free\_shipping=customVar\_free\_shipping\_cost}}

The %free\_shipping will be replaced by the value from the custom variable free\_shipping\_cost.

Installation
------------

[](#installation)

### Installation using composer (recommended)

[](#installation-using-composer-recommended)

To install the extension login to your environment using SSH. Then navigate to the Magento 2 root directory and run the following commands in the same order as described:

Enable maintenance mode:

```
php bin/magento maintenance:enable
```

1. Install the extension:

```
composer require triveon/translate-custom-variables
```

2. Enable the Translate Custom Variables Magento 2 plugin

```
php bin/magento module:enable Triveon_TransCustomVars
```

3. Update the Magento 2 environment:

```
php bin/magento setup:upgrade
```

When your Magento environment is running in production mode, you also need to run the following comands:

4. Compile DI:

```
php bin/magento setup:di:compile
```

5. Deploy static content:

```
php bin/magento setup:static-content:deploy
```

6. Disable maintenance mode:

```
php bin/magento maintenance:disable
```

### Installation manually

[](#installation-manually)

1. Download the extension directly from [github](https://github.com/triveon/translate-custom-variables) by clicking on *Code* and then *Download ZIP*.
2. Create the directory *app/code/Triveon/TransCustomVars* (Case-sensitive)
3. Extract the zip and upload the code into *app/code/Triveon/TransCustomVars*
4. Enable the Translate Custom Vars Magento 2 plugin

```
php bin/magento module:enable Triveon_TransCustomVars
```

5. Update the Magento 2 environment:

```
php bin/magento setup:upgrade
```

Update
------

[](#update)

To update the Translate Custom Variables Extension run the following commands:

```
composer update triveon/translate-custom-variables
php bin/magento setup:upgrade
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 77.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~61 days

Total

2

Last Release

906d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/150952642?v=4)[Triveon](/maintainers/triveon)[@triveon](https://github.com/triveon)

---

Top Contributors

[![jansentjeu](https://avatars.githubusercontent.com/u/161043478?v=4)](https://github.com/jansentjeu "jansentjeu (7 commits)")[![semantic-release-bot](https://avatars.githubusercontent.com/u/32174276?v=4)](https://github.com/semantic-release-bot "semantic-release-bot (2 commits)")

---

Tags

cms-blockcms-pagemagentomagento-2magento-extensionsmagento-translationsmagento2magento2-extensionmagento2-module

### Embed Badge

![Health badge](/badges/triveon-translate-custom-variables/health.svg)

```
[![Health](https://phpackages.com/badges/triveon-translate-custom-variables/health.svg)](https://phpackages.com/packages/triveon-translate-custom-variables)
```

###  Alternatives

[smarty-gettext/smarty-gettext

Gettext plugin enabling internationalization in Smarty Package files

752.5M8](/packages/smarty-gettext-smarty-gettext)[devaslanphp/auto-translate

Auto generate translation JSON files

6627.3k](/packages/devaslanphp-auto-translate)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
