228vit/my-i18n-plugin

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

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony1-plugin

dev-master 2015-04-30 08:57 UTC

This package is not auto-updated.

Last update: 2024-12-25 09:38:53 UTC


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