Hello,
I try to make a website with i18n implementation. Here is what my
schema.yml looks like :
----------------------------------------------------------------------------------
propel:
member:
_attributes: { phpName: Membre }
id:
operator_id: { type: integer, default: 1, primaryKey:
false, foreignTable: operator, foreignReference: id, required: true }
speciality1: { type: integer, primaryKey: false,
foreignTable: speciality, foreignReference: id, required: true }
speciality2: { type: integer, primaryKey: false,
foreignTable: speciality, foreignReference: id }
speciality3: { type: integer, primaryKey: false,
foreignTable: speciality, foreignReference: id }
{...}
operator:
_attributes: { phpName: Operator }
id:
pseudo: varchar(255)
{...}
speciality:
_attributes: { phpName: Speciality }
id:
speciality_i18n:
_attributes: { phpName: SpecialityI18n }
name: { type: varchar(255), required: true }
----------------------------------------------------------------------------------
To get speciality names in the list of members of the CRUD interface
(instead of their ids), I do:
//In Member.php
public function getSpeciality1Name()
{
return parent::getSpecialityRelatedBySpeciality1()-
>getName();
}
//In the template listSuccess.php
<?php echo $member->getSpeciality1Name() ?>
//In Speciality.php
public function __toString()
{
return $this->getName();
}
But I have a blank field instead !!!
I have a default culture defined and it seems to work :
"<?php echo $this->getContext()->getUser()->getCulture () ?>" return
"fr_FR" and debug mode in Symfony shows "fr_FR" in global's variables.
Please help me, I spin around for 2 weeks now :-(
greetings
---
Thibault
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---