Add multilingual capabilities to your Doctrine models.

Questionnaire:
  actAs:
    WebEnq4_Template_I18n:
      fields: [title]
  columns:
    title: string
    active: boolean

Based on Doctrine I18n, adapted to support re-use of translations.

package WebEnq4_I18n
author Rolf Kleef

 Methods

Adds a translation_id column to the (semi)owner table and returns it as the intended foreign key for the translations table.

buildForeignKeys(\Doctrine_Table $table) : array

The column is automatically added to the generated translation model so we can create foreign keys back to the table object that refers to it.

Parameters

$table

\Doctrine_Table

the table object that owns the plugin

Returns

arrayan array of foreign key definitions

Build the local relationship on the generated model for this generator instance which points to the invoking table in $this->_options['table']

buildLocalRelation(string $alias) : void

Parameters

$alias

string

Alias of the foreign relation

Get the foreign key of the generated relationship

getRelationForeignKey() : string

Returns

string$foreign

Get the local key of the generated relationship

getRelationLocalKey() : string

Returns

string$local

 Properties

 

$_options