drupal-composer/drupal-l10n 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

drupal-composer/drupal-l10n

最新稳定版本:2.0.5

Composer 安装命令:

composer require drupal-composer/drupal-l10n

包简介

Composer Plugin for downloading Drupal translation files

README 文档

README

CI

Composer plugin for automatically downloading Drupal translation files when using Composer to manage Drupal projects.

This plugin is useful when you want to package your project and then deploy this package on a target environment and that this environment does not have access to a localization server. So you have to prepare the translations before deploying.

It avoids you to have to put the localization files under your VCS or to have a local site to download the translations.

Usage

Run composer require drupal-composer/drupal-l10n in your composer project before installing or updating drupal/core.

Once drupal-l10n is required by your project, it will automatically download the translations files whenever composer update download new versions of Drupal projects installed. It also runs on composer require command.

You can manually download the localization files according to your configuration by using composer drupal:l10n.

Configuration

You can configure the plugin by providing some settings in the extra section of your root composer.json.

{
  "extra": {
    "drupal-l10n": {
      "destination": "translations/contrib",
      "languages": [
        "fr",
        "es"
      ]
    }
  }
}

The destination parameter may be used to specify the destination folder of the translation files. By default the destination is sites/default/files/translations.

The languages parameter specify the languages you want to retrieve.

Drupal configuration

You can say to Drupal to not download translations files by updating your configuration on the pages:

  • /admin/config/regional/translate/settings: Local files only option
  • /admin/config/media/file-system: Interface translations directory field

or by putting the following lines in your settings.php file:

$config['locale.settings']['translation']['path'] = 'translations/contrib';
$config['locale.settings']['translation']['use_source'] = 'local';

统计信息

  • 总下载量: 319.25k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2018-07-03