定制 sourcerer-mike/wp-easy-translate 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

sourcerer-mike/wp-easy-translate

Composer 安装命令:

composer require sourcerer-mike/wp-easy-translate

包简介

Easily manage translations with your team and VCS like GIT or SVN.

README 文档

README

composer require sourcerer-mike/wp-easy-translate

This tool helps you with your tranlations. Real developer use their console ;)

wp-easy-translate theme twentysixteen
wp-easy-translate plugin akismet

And then the magic happens:

  • All translations with will be fetched.
  • Your source files (po, php or json) will be updated.
  • The binaries (MO-Files) will be updated to.

Translate with ease!

Formats

Run wp-easy-translate themes --format php to get a PHP-Array:

<?php return array (
  'some_textdomain' => 
  array (
    '' => 
    array (
      'domain' => 'some_textdomain',
      'lang' => 'de',
      'plural-forms' => 'nplurals=2; plural=(n != 1);',
    ),
    'General' => 
    array (
      0 => '',
      1 => 'Allgemeines', // THIS IS VERY THE TRANSLATION HAPPENS
    ),
    'Author' =>
     
    ...

My favourite! Or wp-easy-translate themes --format json to have a nice and clean list:

{
    "General": "Allgemein",
    "Author": "Autor",
    "Steak": "Schnitzel",
    "Tank": "Panzerwagen",
}

Formats like YAML are planned. Even CSV will come so that your customer can contribut with translations made in Excel. I guess they don't like to edit JSON or YAML files ;)

Updates every time

Work and run wp-easy-translate themes again to update your PO-Files:

  • Obsolete translations will be removed
  • New translations will be added
  • MO-Files are updated every time.

Copy and Translate

Everytime wp-easy-translate theme foo runs there will be a "empty.po" (or "empty.php", "empty.json") file in the languages folder of every theme. Just copy it to "de_DE.po" or "en_GB.po" (or "php", "json") and add the translations.

With every run of wp-easy-translate theme foo the according MO-File ("de_DE.mo", "en_GB.mo") will be updated.

统计信息

  • 总下载量: 90
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-03-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固