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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Translation Sitetree Bug?


Go to End


2 Posts   759 Views

Avatar
sashion

Community Member, 25 Posts

30 November 2011 at 6:42am

Heyho,

to start with... I already used the Language Extension and it always seemed to work.
Now that I use Silverstripe v 2.4.6 I tried to use the new way of including it like this:

Translatable::set_default_locale("de_DE");
Object::add_extension('SiteTree', 'Translatable');
Translatable::set_allowed_locales(array(
   "de_DE",
   "en_GB"
));

The thing is when I do it the folling effects appear:

Frontend: The navigation and the content disappear
Backend: tI do see the translation tab.... but the Site-Tree Stucture doesn´t show all Children anymore in the German default language

I know this sounds weird.. but maybe anyone of you stumpled over anything similar?

Thanx in advance,
sash

Avatar
sashion

Community Member, 25 Posts

30 November 2011 at 9:44am

Edited: 30/11/2011 9:56am

Hey Folks,

Finally I solved it myself.
If anyone is facing kind of the same trouble as I did this might be a solution:

Silverstripe seems to get confused if you define the default language after creating some sites and then activating the translation.
So first all you have to do is delete all pages you created for your second language so that only your default mother language sites are left. Then go to the Database table 'SiteTree' and ensure that the field 'Locale' has everywhere not only a but also the same value, in my case 'de_DE'. Now you should be able to create foreign language pages without any weird UI / frontend effects.

Hope this helps anyone in the future :)

Cheers,
sash