We're building an app that is internationalised in Cakephp 3.0.8 , and with all static stuff everything is fine, but we're having some issues with the translation of database contents.
In the process of building an interface for our translators to translate content in the tables, it would be awesome to be able to have an interface with something like:
+---------+---------+--------+---------+---------+
| English | Danish | German | Spanish | Swedish |
+---------+---------+--------+---------+---------+
| Save | Gem | ____ | ____ | ____ |
| Edit | Rediger | ____ | ____ | ____ |
+---------+---------+--------+---------+---------+
so the translators can start working on the missing translations. Point is that all the strings that have missing translations should just be shown here
To achieve this, it would be nice to be able to get
But especially 1) seems quite hard, or are we missing something?
We're using the core TranslationBehaviour (link)
Pasting the answer on behalf of the original question author:
Allright, I got the answer for 1)
from #cakephp @ Freenode.org
. The following will output the correct fields that should be translated:
$this->TableName->behaviors()->get('Translate')->config('fields');
Translation for already translated fields can be retrieved by using $table->find('translations')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With