I would like to configure Symfony to get Translation from Mysql and not from XLIFF files.
I see explaination on this page : http://www.symfony-project.org/reference/1_4/en/05-Factories#chapter_05_i18n
I configure the factories.yml:
i18n:
class: sfI18N
param:
source: MySQL
And I get this error: 500 | Internal Server Error | sfException Error in connecting to Array.
I think I should configure which database but I don't know how to do it with do开发者_如何学编程ctrine.
Can anyone help me ? :)
Thanks.
It is described here:
http://www.symfony-project.org/gentle-introduction/1_4/en/13-I18n-and-L10n
jump to section "Text Information in the Database".
Quick description:
- create your table like "tablename"
- create the translation table "tablename_i18n" like:
- id
- culture
- name ( <= this is what you want to translate)
Now generate the model and it will automatically generate the getName() method against the Tablename object, but it's gonna have a parameter the culture.
精彩评论