17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2713 Views |
-
Multilanguage Website

6 July 2007 at 1:30am
Hi there,
could someone give me an idea about realizing a multilanguage website with SilverStripe?! To be clear here: Frontend Content - not Admin.
I know that this point is in progress and development, but i need now a solution to this. Anyone?!
Thanks.
Hartmut
-
Re: Multilanguage Website

6 July 2007 at 5:31am
Nobody who builds a multilanguage site?!
Regards
Hartmut
-
Re: Multilanguage Website

8 July 2007 at 9:13pm
Your best bet is to add a custom fields in your Page class, such as GermanTitle and GermanContent
Then make 2 functions, Title() and Content(), on your Page class:
function Title() {
if( /* current language is german */) {
return $this->GermanTitle;
} else {
return $this->Title;
}
}The final thing you've got to choose is how to switch between German and English. The simplest is probably a session variable, although this isn't very Google-friendly.
An alternative would be to set up a Director rule (call to Director::addRules) that mapped de/$URLSegment/$Action to a German version of ModelAsController.
I haven't spelled it out completely, but this should get you started. Good luck!
| 2713 Views | ||
|
Page:
1
|
Go to Top |


