A
A
Alexander2016-08-23 16:50:19
symfony
Alexander, 2016-08-23 16:50:19

How can a beginner properly organize Symfony2 multilingualism?

I started to study symphony2,
I want to translate a simple project, which is now written in PHP
, the site is multilingual (up to 6 languages)
, at first there will be 2 languages, the rest of the interface will gradually be pulled up
, you can translate using The Translation Component, as I understand
it, but how to organize multilingual elements?
create a separate field in the database for each language -> it’s kind of stupid
to create a field with a language identifier and check and display the desired string in the template -> better, but there are some fields that should not be translated,
the decision needs to be made now, in order to properly plan the architecture,
please tell me how can be done in this case.
Today I just started to study symphonies, I still don’t know many concepts, if I can formulate a more detailed answer

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Skobkin, 2016-08-23
@alexmixaylov

Translatable in Doctrine Extensions for example. Installed with DoctrineExtensionsBundle .

S
shagguboy, 2016-08-23
@shagguboy

symfony.com/doc/current/translation.html
in short - you make a file messages.ru.xliff and shove translations into it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question