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.

Releases and Announcements /

Latest news about the SilverStripe software.

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

2.3: Translation methodic changed?


Reply


6 Posts   1897 Views

Avatar
bschmitt

Community Member, 22 Posts

4 February 2009 at 4:21am

Hi there,

I have a general question to the new release 2.3: It seems that the "multilingualcontent" methodic changed totally from the 2.2 version?

At the 2.2 version you can create a page with different language versions (same url), so that you can change the language by adding ?lang=XX. Within the cms all pages from the master language are displayed in other languages as well (even if they are not translated), because of this it’s easily possible to translate a new page by clicking at the tree.

At the new 2.3 version (I used a svn checkout from today) it’s only possible to translate a page to a different filename? So that I cannot use the same filename for more than one language - ?lang=XX is not working too. Is that right or is there a mistake by me?
It looks that this connection between translated files to the master file isn’t existing anymore?

Here is my config: Translatable::enable();

All in all I like the 2.3 release (e.g. GUI, cache, etc.), but this would be a restriction.

Thanks for your comments,
Bjoern

Avatar
Ingo

Forum Moderator, 801 Posts

9 February 2009 at 7:25am

Edited: 09/02/2009 8:01am

Hey Björn, just some smaller additions to my previous email response to you:
You probably checked out trunk, not branches/2.3, right? The deeper Translatable fixes unfortunately won't make it into the initial 2.3 release because they need more testing and RC-cycles than the rest of the system.

For the same URLs in multiple languages, the code in question is in Translatable::onBeforeWrite():
http://open.silverstripe.com/browser/modules/sapphire/trunk/core/model/Translatable.php#L483

It would be fairly easy to allow for duplicate URLs across languages, but you'd lose the ability to cache on an HTTP level as the pages would represent more than one "resource" (in RESTful speak).
Example with duplicate URLs: http://mysite.com/group/?lang=en, http://mysite.com/group/?lang=de
Example with unique URLs: http://mysite.com/group, http://mysite.com/gruppe

Duplicate URLs would also potentially harm your Google ratings, as you're providing different content to different clients - any experiences on this?

You suggested in your email response to have subfolders for URLs (http://mysite.com/en/group, http://mysite.com/de/group). We're open for patches in this area, but currently its not implemented.

Generally we could make this enforcing of unique URLs configurable, but currently this implies that we have to append the "lang" GET variable to all URLs in menu generation, tinymce links etc - feel free to play around with this and let me know how you go on.

I'd like to hear some more opinions on this matter, so we can decide if its worth the effort, and consequently open an enhancement ticket request.

Avatar
Ingo

Forum Moderator, 801 Posts

9 February 2009 at 7:27am

Edited: 09/02/2009 7:27am

By the way, the architectural changes of Translatable are summarized in
http://groups.google.com/group/silverstripe-dev/browse_thread/thread/91e26e1f78d3c1b4/bd276dd5bbc56283?lnk=gst&q=translatable#bd276dd5bbc56283
and
http://groups.google.com/group/silverstripe-dev/browse_thread/thread/a3986a7be154570d/a7328100016da189?lnk=gst&q=translatable#a7328100016da189

Avatar
Nivanka

Community Member, 400 Posts

10 February 2009 at 7:38am

BTW I raid a question about this somewhere else I cant remember though, I cant save any of the strings I translate, it gives me an error, so will anyone look into that,

I am translating the CMS to Sinhala

Avatar
Ingo

Forum Moderator, 801 Posts

10 February 2009 at 8:48am

Hey Nivanka, I'm assuming you're referring to translate.silverstripe.com, as opposed to the Translatable module in core?
I've tried saving on http://translate.silverstripe.com/i18n/translate/si_LK - works fine here. We had saving problems about a week ago, is this still an issue for you?

Avatar
bschmitt

Community Member, 22 Posts

11 February 2009 at 5:54am

Thanks for your detailed description, Ingo!
I'll try to play around with this!
Suggestions are welcome :-)