Krzysztof Biernacki programista PHP
Temat: Symfony 1.4 - I18n (obsługa wielu języków)
Witam.Mam taki oto schemat w pliku schema.yml:
Article:
actAs:
Timestampable: ~
I18n:
fields: [title, keywords, description, text]
columns:
id:
type: integer(4)
fixed: false
unsigned: false
primary: true
autoincrement: true
title:
type: string(255)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
keywords:
type: string()
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
description:
type: string()
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
text:
type: string()
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
is_active:
type: enum(5)
fixed: false
unsigned: false
values:
- 'true'
- 'false'
primary: false
default: 'false'
notnull: true
autoincrement: false
relations:
Categories:
class: Category
refClass: CategoryHasArticle
local: article_id
foreign: category_id
foreignAlias: Articles
CategoryHasArticle:
local: id
foreign: article_id
type: many
Po wykonaniu polecenia:
doctrine:insert-sqlw bazie danych tworzą mi się dwie tabele: article oraz druga z tłumaczeniami. Sęk w tym, że w tej podstawowej (article) są kolumny typu title_en, zamiast title (polska wersja językowa), a w tej z tłumaczeniami title. W jaki sposób poinformować mechanizm Symfony o tym, aby tabela z tłumaczeniami a w niej kolumny miały znacznik _en? Proszę o wyrozumiałość i pomoc.