Hi,

There is another way on the wiki to manage i18n db translations via
the admin generator since few days ago :
http://trac.symfony-project.com/trac/wiki/HowToHandlei18nDbFieldsWithAdminGeneratorMethod2
This process can handle with many internationalized fields.

I tried to make it work on my own schema but I didn't really
success ... First, this tutorial seems to work only with culture with
only the language part ("fr" for example) and not language+country
("fr_FR"). So I modified the __call function in order to make it
work :
(http://hashbin.com/4a2.html)

  public function __call($m, $a)
  {
    $data = @split('I18n', $m, 2);
    if( count($data) != 2 )
      throw new Exception('Tried to call unknown method
'.get_class($this).'::'.$m);
    list( $method, $culture ) = $data;
    $language = substr($culture,0,2);
    $country = substr($culture,2);
    $culture = strtolower($language).'_'.strtoupper($country);
    $this->setCulture( $culture );
    return call_user_func_array(array($this, $method), $a);
  }

The admin generator fields look like this now "title_i18n_fr_FR". I
don't know why, but Symfony doesn't seem to take care of my fields
description ! My input tag are "disabled" and the name stay "title
i18n fr fr" even if I precise "title_i18n_fr_FR:    { name: Titre FR,
params: disabled=false }" in the generator.yml
Another strange behaviour is that the create button doesn't work
either ...

Please, if someone knows what I have to do ... let me know

Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to