triveon/translate-custom-variables
最新稳定版本:1.1.1
Composer 安装命令:
composer require triveon/translate-custom-variables
包简介
A module to use custom variables in translatable CMS strings
README 文档
README
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?
- 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
- To do this, the prefix "customVar_" must be placed before the custom variable code in the translation string
- 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 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
- Install the extension:
composer require triveon/translate-custom-variables
- Enable the Translate Custom Variables Magento 2 plugin
php bin/magento module:enable Triveon_TransCustomVars
- 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:
- Compile DI:
php bin/magento setup:di:compile
- Deploy static content:
php bin/magento setup:static-content:deploy
- Disable maintenance mode:
php bin/magento maintenance:disable
Installation manually
- Download the extension directly from github by clicking on Code and then Download ZIP.
- Create the directory app/code/Triveon/TransCustomVars (Case-sensitive)
- Extract the zip and upload the code into app/code/Triveon/TransCustomVars
- Enable the Translate Custom Vars Magento 2 plugin
php bin/magento module:enable Triveon_TransCustomVars
- Update the Magento 2 environment:
php bin/magento setup:upgrade
Update
To update the Translate Custom Variables Extension run the following commands:
composer update triveon/translate-custom-variables php bin/magento setup:upgrade
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: OSL-3.0
- 更新时间: 2023-12-23