Monday, January 23, 2012

Problem with saveAll translations within one form - CakePHP multilingual website

Hello.

I'm making multilingual website and I want administrator to add and
edit subpage in all available languages within one form.

The add function works fine, the problem is when I want to edit
subpage and all translations at one time - one of the fields does not
want to update in i18n table.

Model:
http://pastebin.com/Mas1aciu

add function (works fine, adds record to "subpages" table and records
to "i18n" table containing title, link and content in every language):
http://pastebin.com/N61WLwNQ

add view:
http://pastebin.com/Y6a1WquA

edit function:
http://pastebin.com/1ZdumqUe

edit view:
http://pastebin.com/BWcXvGKY

Editing title and content and saving form changes only the
translations of fields "link" and "content" in i18n table. The title
just won't change at all in translations table, after editing a form.

I've just build another model - Category. Same issue here, although I
translate only two fields (name and link, based on the name). The same
situation with editing - only "link" translation is being updated, and
"name" isn't.

Anyone has a clue? Or maybe there is some better solution to create
and update dynamic translations with the use of one form?

Regards,
Anna

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: