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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

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

Director Rul and Translatable Module

Go to End



Community Member, 1 Post

18 July 2013 at 4:23am

Edited: 18/07/2013 4:28am

I am developing a Project using Silverstripe 3.1 beta 3. It is Multilingual, only two languages (de_DE, en_US).
For Implementing Multilingual functionality on the site I installed the Translatable Module. It is working properly on the Pages but not on DataObjects. For that purpose I tried to solve it in a way to make more fields for each Language since I have only 3 fields to be translated. It is all working properly in CMS and Frontend. To show the DataObjects in Frontend I am using the Director rules in mysite/_config/config.yml file:
'referenzen/projekte/$Kat/$RefID/$LeistungID': 'ReferenzDetailPage_Controller'
'references/projects/$Kat/$RefID/$LeistungID': 'ReferenzDetailPage_Controller'

My problem is that in the Controller and its viewer Template I have no access on the Locale Variable to show the right Language Fields accordingly. I tried to save the Locale value on a session variable and use it to differentiate between languages but it is overwritten and shows me always the default set Language which is (de_DE).

Using Uncle Cheese Module for DataObject Translation having the same problem.

Can anyone Help please? Am I on the right path? I am relatively new to Silverstirpe. Thanks!