As having searched for a while to find the right solution, here are the steps to enable i18n over MySQL with Symfony 1.1

Configuration (factories.xml)

Edit or create "factories.xml" in global config directory or any app directory as following (replace with your db)

all:
  i18n:
    class: sfI18N
    param:
      source: MySQL
      
prod:
  i18n:
    param:
      database: "mysql://user:pass@host/db"
      debug: off
    cache:
        class: sfFileCache
        param:
          automatic_cleaning_factor: 0
          cache_dir:                 %SF_I18N_CACHE_DIR%
          lifetime:                  86400
          prefix:                    %SF_APP_DIR%

dev:    
  i18n:
    class: sfI18N
    param:
      database: "mysql://user:pass@host/db"
      debug: on
      untranslated_prefix: "[T]"
      untranslated_suffix: "[/T]"
    cache:
        class: sfNoCache

This will activate i18n with MySQL. But the the database tables must be added

DB schema (translation_schema.xml)

This content can be found in "\lib\symfony\i18n\sfMessageSource_MySQL.class.php" :

<?xml version="1.0" encoding="UTF-8"?>
<database name="propel" package="lib.model" defaultIdMethod="native">
        <table name="catalogue">
                <column name="cat_id" type="integer" required="true"
                        primaryKey="true" autoincrement="true" />
                <column name="name" type="varchar" size="100" />
                <column name="source_lang" type="varchar" size="100" />
                <column name="target_lang" type="varchar" size="100" />
                <column name="date_created" type="timestamp" />
                <column name="date_modified" type="timestamp" />
                <column name="author" type="varchar" size="255" />
        </table>
        <table name="trans_unit">
                <column name="msg_id" type="integer" required="true"
                        primaryKey="true" autoincrement="true" />
                <column name="cat_id" type="integer" />
                <foreign-key foreignTable="catalogue" onDelete="cascade">
                        <reference local="cat_id" foreign="cat_id" />
                </foreign-key>
                <column name="id" type="varchar" size="255" />
                <column name="source" type="longvarchar" />
                <column name="target" type="longvarchar" />
                <column name="comments" type="longvarchar" />
                <column name="date_created" type="timestamp" />
                <column name="date_modified" type="timestamp" />
                <column name="author" type="varchar" size="255" />
                <column name="translated" type="integer" />
        </table>
</database>

You can add this content to your "schema.xml" or create a new one (what I've done). Anyway there is no yaml version so if you only have a schema.yml either you'll have to translate the xml other you can create a new file named *****schema.xml with the content shown above.

To take the new schema in account you'll have to execute :

  • php symfony propel:build-sql
  • php symfony propel:insert-sql (warning this will erase all data)
  • php symfony propel:build-model
  • php symfony cc

Base data

The "catalogue" table must be filled with the languages you want to translate: Catalogue table content

Then you'll be able to add translation units in trans_unit table: Translate content

That's all folks

After understanding this, it is not complicated but as there are various outdated information on the net, it's hard to get the right solution. I've also discovered that only "name" column of "catalogue" table is relevant to find the translation (and "source" column of "trans_unit" table). The "source_lang" and "target_lang" is not used as shown in the sfMessageSource_MySQL.class php file:

public function &loadData($variant)
  {
    $variant = mysql_real_escape_string($variant, $this->db);

    $statement =
      "SELECT t.id, t.source, t.target, t.comments
        FROM trans_unit t, catalogue c
        WHERE c.cat_id =  t.cat_id
          AND c.name = '{$variant}'
        ORDER BY id ASC";

I hope anybody could find this information useful...