Witam.
Wydaje mi się, że już Twoja schema jest nie do końca proprawna. W tabeli
statusyfirmy_i18n brakuje chociażby pola
culture, które odpowiadałoby za określenie, w jakim języku jest dany wpis. Zobacz sobie na:
http://www.symfony-project.org/book/1_0/13...d-L10n#Creating Localized Schema://http://www.symfony-project.org/book...ocalized Schema://http://www.symfony-project.org/book...ocalized Schema. Ja podam tutaj swój sposób, który (przynajmniej u mnie

) działa i nie zauważyłem jeszcze z nim żadnych problemów.
Moja schema:
<?php
_attributes
: { phpName
: Link, isI18N
: true, i18nTable
: link_i18n
} id: { type: integer, required: true, primaryKey: true, autoincrement: true }
category_id: { type: integer, required: true, foreignTable: link_category, foreignReference: id }
user_id: { type: integer, required: true, foreignTable: sf_guard_user, foreignReference: id }
url: { type: varchar, size: 255 }
created_at:
link_i18n:
_attributes: { phpName: LinkI18N }
id
: { type
: integer
, required
: true, primaryKey
: true, foreignTable
: link, foreignReference
: id
} culture: { isCulture: true, type: varchar, size: 7, required: true, primaryKey: true }
title: varchar(250)
description: { type: longvarchar }
?>
Generator.yml:
<?php
generator:
class: sfPropelAdminGenerator
param:
theme: default
list:
display: [id, category, user, title, url, created_at]
fields:
category:
params: disabled=false
object_actions:
_edit: ~
_delete: ~
filters: [category]
edit:
display:
"Overall": [category_id, user_id, url, created_at]
"Title":
- title_i18n_pl
- title_i18n_en
"Description":
- description_i18n_pl
- description_i18n_en
fields:
description_i18n_pl:
name: Polish
type: textarea_tag
params: disabled=false size=100x4 rich=true
description_i18n_en:
name: English
type: textarea_tag
params: disabled=false size=100x4 rich=true
title_i18n_pl:
name: Polish
params: disabled=false
title_i18n_en:
name: English
params: disabled=false
?>
Do tego wszystkiego, w
/lib/model/om/ stworzyłem dodatkową klasę, nazwaną
i18nBaseClass:
<?php
class i18nBaseClass extends BaseObject
{
public function __construct()
{
$this->setCulture(sfContext::getInstance()->getUser()->getCulture());
}
}
?>
W klasie
/lib/model/om/BaseLink.php zmieniłem klasę-rodzica na swoją, utworzoną przed chwilą
i18nBaseClass:
<?php
abstract class BaseLink extends i18nBaseClass implements Persistent {
...
}
?>
I na konieć, do klasy
/lib/model/Link.php dodałem taki kod:
<?php
/**
* Subclass for representing a row from the 'link' table.
*
*
*
* @package lib.model
*/
class Link extends BaseLink
{
function __call($methodName, $params)
{
$nameTab = @explode('I18n', $methodName, 2
);
{
list ($method, $culture) = $nameTab;
$this->setCulture($culture);
return call_user_func_array
(array($this, $method), $params); }
else
return parent::__call($methodName, $params);
}
}
?>
I to by było na tyle. Na razie nie zauważyłem problemów z działaniem przy takiej metodzie

Pozdrawiam.