I've set up a new project using symfony 1.4RC2 and Propel and I decided 
to try i18n support in Propel for the first time. This is a part of my 
schema.yml:

propel:
   category:
     _attributes:
       phpName:            Category
       package:            lib.model.testing
       isI18N:             true
       i18nTable:          category_i18n
     _propel_behaviours:
       timestampable:      ~
       auto_add_pk:        ~
     name:
       type:               varchar(20)
       required:           true
       index:              unique
     title:
       type:               varchar(255)
       required:           true

   category_i18n:
     _attributes:
       package:            lib.model.testing
     id:
       type:               integer
       required:           true
       primaryKey:         true
       foreignTable:       category
       foreignReference:   id
     culture:
       isCulture:          true
       type:               varchar
       size:               7
       required:           true
       primaryKey:         true
     title:
       type:               varchar(255)

Using this, the generated BaseCategory.class.php contains methods like 
these:

/**
  * Get the [title] column value.
  *
  * @return     string
  */
public function getTitle()
{
        return $this->title;
}

/**
  * Returns the "title" value from the current {...@link CategoryI18n}.
  */
public function getTitle($culture = null)
{
   return $this->getCurrentCategoryI18n($culture)->getTitle();
}

You can see this can't work (the same method is declared twice).
Is there something I'm doing wrong or is this a bug in the generator? 
It's the same when using the dev trunk of symfony 1.4.

I also noted that "isI18N: true" is the only place where i18n uses an 
uppercase N. At first I had a lowercase one and it didn't work. This 
seems like some unlogical legacy piece to me, perhaps this could be 
improved by allowing both "isI18N" and "isI18n" or go for "isI18n" in 
1.4 only.

The "what's new in 1.3/1.4" article shows some new Propel yaml syntax 
using classes instead of table names, but I couldn't find any detailed 
information about this. Is this documented somewhere else?

David

--

You received this message because you are subscribed to the Google Groups 
"symfony developers" 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-devs?hl=en.


Reply via email to