Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Problem! Translations of user defined form (DE/EN) overwrites settings


Reply


3 Posts   1666 Views

Avatar
bird

Community Member, 9 Posts

5 September 2008 at 12:27pm

Hi there!

I created a new Silverstripe-site and startet with german language by default.
Everything works perfectly but creating user defined forms for contacting purpose in two languages fails.

For example:
Creating a german udf-page "Kontakt" and filling in some fields and boxes works fine.
Translating this page into english "Contact" messes up the whole system. Changing texts and forms to "EN" automatically overwrites the german page...CMS can't handle it and freezes.

After restart german pages inherit all the english settings and vice versa???
Do these forms share their fields and settings!? How to fix that?
I'n not a php crack and really need support! Thanks!!!

Avatar
Ingo

Forum Moderator, 801 Posts

12 September 2008 at 9:41am

EditableFormField and subclasses (which form the basis for UserDefinedForm) are currently not translatable. It might be a simple matter of adding the Translatable extension to these classes (see http://doc.silverstripe.com/doku.php?id=multilingualcontent) - perhaps you can give it a try and test a bit? Either way, I've created a ticket: http://open.silverstripe.com/ticket/2794

Avatar
bird

Community Member, 9 Posts

12 September 2008 at 10:11am

Hey Ingo,

thanks for your support! I'm not quite sure if I can add the translatable extension to that class that easy...all efforts to create translatable fields by creating classes wich are loaded after the sitetree core fail so far... I think the il8n routine doesn't take all the additional classes and fields into account...I can only create some translatable fields by modifying the sitetree.php (but that works fine)
I created a clumsy workaround for translatable fieldlabels by connection a language detection to all the names (assigned as varaibles) used in the form... this way some standards (name, email, message, etc.) are automatically translated in the right langauge... not the best way but does the job.

Maybe I try to improve this method the next days