承接 php-translation/extractor 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

php-translation/extractor

最新稳定版本:2.2.2

Composer 安装命令:

composer require php-translation/extractor

包简介

Extract translations form the source code

README 文档

README

Latest Version Total Downloads

Extract translation messages from source code

Install

Via Composer:

$ composer require php-translation/extractor

Usage

$extractor = new Extractor();

// Create an extractor for PHP files
$fileExtractor = new PHPFileExtractor();

// Add visitors
$fileExtractor->addVisitor(new ContainerAwareTrans());
$fileExtractor->addVisitor(new ContainerAwareTransChoice());
$fileExtractor->addVisitor(new FlashMessage());
$fileExtractor->addVisitor(new FormTypeChoices());

// Add the file extractor to Extactor
$extractor->addFileExtractor($fileExtractor);

// Define where the source code is
$finder = new Finder();
$finder->in('/foo/bar');

//Start extracting files
$sourceCollection = $extractor->extract($finder);

Found an issue?

Is it something we do not extract? Please add it as a test. Add a new file with your example code in tests/Resources/Github/Issue_XX.php, then edit the AllExtractorsTest to make sure the translation key is found:

// ...
$this->translationExists($sc, 'trans.issue_xx');

统计信息

  • 总下载量: 4.31M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 128
  • 点击次数: 1
  • 依赖项目数: 7
  • 推荐数: 0

GitHub 信息

  • Stars: 128
  • Watchers: 7
  • Forks: 33
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固