定制 228vit/my-i18n-plugin 二次开发

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

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

228vit/my-i18n-plugin

Composer 安装命令:

composer require 228vit/my-i18n-plugin

包简介

Symfony 1.4+ Plugin. Make all i18n signs on your site editable from backend

README 文档

README

Store in DB, and edit in backend, all i18n items used on your site

* Installation

$ git submodule add git://github.com/228vit/myII18NPlugin.git plugins/myII18NPlugin
$ git submodule init
$ git submodule update
$ symfony doctrine:generate-migrations-diff
$ symfony doctrine:generate-migrate

* Enable plugin in config/ProjectConfiguration.class.php

{{{
class ProjectConfiguration extends sfProjectConfiguration
{
  public function setup()
  {
    $this->enablePlugin('myII18NPlugin');

}}}


* Usage
{{{
  myI18N::get('site.company_name', 'Company name', 'en');
}}}

Please note, if setting does not exists, new one will be created with default value. 

* Manage translations in admin
  
  Generate admin module

  $ ./symfony doctrine:generate-admin backend I18NItem --module=i18n
  backend.php/i18n

* Edit form lib/form/doctrine/

* To reduce DB queries lets dump all setting into sfConfig
  
Edit apps/appName/config/filters.yml
myII18N:
  class:    myII18NFilter


统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-30