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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Multilingual Content - alternative to 'translatable'


Go to End
Reply


44 Posts   11592 Views

Avatar
1nsane

Community Member, 14 Posts

25 July 2009 at 5:28am

Great recipe - almost works great for what I need it for. I have two localized versions of a website (one for canada and one for the US - both in english) that have some pages that are different and some that are the same. My goal was to have the urls of canadian specific pages prefixed with /can/. I've got that all working great, the menus are building properly, etc.

But I'm having one problem - if I link to a page within the content editor, where there is a canadian version and a US version (say /about-us and /can/about-us), the US link is always added by default. I would like to somehow override that default behavior so that if the user is editing the canadian version of the page and they create a link to another page with a canadian "translation", the /can/ prefix is added.

I've looked through the docs and the api and can't seem to find how I would override the "add link" functionality within the CMS main editor. Ideas?

Avatar
Kalileo

Community Member, 127 Posts

27 July 2009 at 12:18am

Edited: 27/07/2009 12:19am

Before I had said this:
Eduardo, your site seems to be not really live yet, so yes, if you can, redo it is SS 2.3.2 and use the new Translatable module.
There you do not need this workaround, just activate translatable.

On a first look SS 2.3.2 seems to add another form for each translation, so you can give it the translated label names right in the CMS admin screen.

Sorry, I have to take that back.

SS 2.3.2 will add a new form for each translation of the form, but (at least in my project) I cannot add fields to the translated form, when I try I get an Error "Error creating field".

The reason seems to be the module User Forms v0.2rc2, where it says in the announcement: "Also, this module currently has bugs when used on multiple-language websites"

This is a critical problem because as long as that is not fixed it means that multilingual SS 2.3.2 websites cannot have translated contact forms. (... try to explain that to the client :s )

I got to get that fixed, so i might post a workaround here sooner or later.

Avatar
Kalileo

Community Member, 127 Posts

27 July 2009 at 2:03am

Edited: 27/07/2009 2:05am

To get the contact forms working in translated, multilingual SS 2.3.2 websites, see here what [url=http://silverstripe.org/all-other-modules/show/260588?start=96#post264247]Juanitou explains to kateh[/url].

Don't just look at the first post there by Juanitou, but also the follow ups on the following pages.

Avatar
CriaturaCreativaStudio

Community Member, 73 Posts

27 July 2009 at 3:47am

Kalileo,

I've migrated my whole site to the last stable version of the CMS, SS 2.3.2.
After following the confusing tutorial to activate translatable, it worked like charm!
I've tested the translation of my famous form. Te problem i've had, is that each time i've added fields on one of the translations, those fields appeared duplicated without the names in the other translation. So what ive had was, the wanted fields (added by me), and a mirrored version of the other language fields, but without their names.
So, what i've did is to delete the "EditableField...." that appeared on the each translation, subsequently (the unwanted duplicates). So now, ive tested both forms from a live site i have, and they work!
I suposse that this is not the best practice, or maybe the best way to translate a form, but for me, works :)

Thank you very much for all your help, and as i said before, if you need some help on the design part, or css, count on me.

Regards

Eduardo

Go to Top