Untranslated object properties with TranslateBehaviour

We are creating an application internationalized in Cakephp 3.0.8, and everything is fine with all the static materials, but we are having some problems translating the contents of the database.

In the process of creating an interface for our translators to translate content into tables, it would be great to have an interface with something like: +---------+---------+--------+---------+---------+ | English | Danish | German | Spanish | Swedish | +---------+---------+--------+---------+---------+ | Save | Gem | ____ | ____ | ____ | | Edit | Rediger | ____ | ____ | ____ | +---------+---------+--------+---------+---------+ +---------+---------+--------+---------+---------+ | English | Danish | German | Spanish | Swedish | +---------+---------+--------+---------+---------+ | Save | Gem | ____ | ____ | ____ | | Edit | Rediger | ____ | ____ | ____ | +---------+---------+--------+---------+---------+

so that translators can start working with missing translations. The point is that all lines that do not have translations should be shown here.

To achieve this, it would be nice to get

  • All fields in the table that need to be translated
  • Translations of already translated fields

But especially 1) it seems rather complicated, or are we missing something?

We use the core TranslationBehaviour ( link )

+8
php internationalization cakephp translation
source share
1 answer

Insert answer on behalf of the original author of the question:

Ok, I got 1) answer from #cakephp @ Freenode.org . Below you will see the correct fields that need to be translated:

 $this->TableName->behaviors()->get('Translate')->config('fields'); 

Translation of already translated fields can be obtained using $table->find('translations')

+6
source share

All Articles