Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What translation strategies and tools do you use whenever you want to translate a text?

user-image
Question added by Dana Qaisi , Social Media Specialist , N/A
Date Posted: 2017/08/09
Hatim Elamin AbdEllatief Abdedaem
by Hatim Elamin AbdEllatief Abdedaem , DIrector of industry adminstration at Gezira state , ministry of finance and economic affairs Gezira state

A translation strategy needs to be selected by adding the translator parameter to the document mapping. The translation strategy is responsible to actually persist the translated properties.

There are two default translation strategies implemented and automatically available:

  • attribute stores the translations in attributes of the node containing the translatable properties
  • child stores the translations in a child node of the node containing the translatable properties

Thus, if you do not have many fields, the attribute strategy puts less load on the content repository. On the other hand, if you have a lot of fields on your document, you may want to use the child strategy.

If needed, it is possible to implement other strategies to persist the translations.

Implementing your own translation strategy

You may want to implement your own translation strategy to persist the translatable properties of a node. For example if you want all the translations to be stored in a separate subtree of you content repository.

To do so you need to implement the Doctrine\\ODM\\PHPCR\\Translation\\TranslationStrategy\\TranslationStrategyInterface.

Then you have to register your translation strategy with the document manager during the bootstrap.

Deleted user
by Deleted user

If I'm in a hurry I'll use Google Translate if it is not in English in order to get the overall meaning. If it is more specialised, I will reach out to my wider network since there is usually someone who can assist me.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.