Hello everyone.
I'm new to SilverStripe. For some days now, i'm trying to solve a multilanguage issue in my templates.
Let me explain:
I'm using for all my Level1 Pages the same template. In this template i have something like a header image which should be the same in its particular section. I did this with the "Level(1).URLSegment" and it worked great in one language! But as soon I change the language the URL changes aswell and my image src breaks.
What I need is a function which returns the Level1 URLSegment of my default Language. Which would be "en_US" in my case.
So for example: There is a "service" Section in which are pages like Contact, Imprint, Sitemap and so on. The function should return always "service" in this section regardless of the current selected Language. I need the “MasterTranslationID”, or better: the URLSegment of the MasterPage.
I have rudimentary knowledge of PHP and OOP and I think the solution is somewhere around "Translatable::getTranslationGroupID" function. But i lack the deeper insight to connect all this into a working function. :S
I hope you understand my english and - more important: my problem :D
Thanks in advance.
You people here are doing an incredible job, i learned so much from this forum already =)
cheers,
Alex