How to create a form to handle multiple inlays for i18n in CakePHP?

I need to create a form in cakephp so that I can paste content into multiple languages ​​at the same time.

For example, if I want to use engand esp, the form will look like this:

Insert english title _____________
Insert spanish title _____________

I use i18n for translated fields, but the documentation doesn't say much, can anyone give me some suggestions?

Also, how can I find out how many languages ​​I use? Do I need to count directories in app / locale?

+5
source share
1 answer

I save the array in bootstrap.php for all languages ​​that the site should support. Regarding the insertion of translations, if you pass something like:

$data = array('ModelName' => array(
  'field_name' => array(
    'eng' => 'This is my name',
    'deu' => 'Das ist mein name'
  )
));

i18n.

+3

All Articles