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.

Archive

Our old forums are still available as a read-only archive.

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

Trying to get two different news archives for two different languages


Reply

3 Posts   1158 Views

Avatar
cabrilo

15 October 2008 at 6:55am Community Member, 3 Posts

Hello all!

I'm new to SilverStrip, so please if you tell me to RTFM please provide a link as well :) Anyway, here is my problem:

I have a website in two languages. I want each language to have it's own news archive (much like the one created in tutorial). So, I would present totally different content depending on the language, not just translate news...

How would I go about this?

My original idea was to create two holders, one for Default Language, other for Secondary Language. Then, I would, depending on the language, get Childrenof (HolderForLanguage), and display them. However, in order for Secondary Language pages to display at all, I would have to write a dummy page in Default Language, and then translate into Secondary Language, which seems like a hassle.

Any ideas?

Avatar
simon_w

15 October 2008 at 8:10am Forum Moderator, 474 Posts

If I understand how i18n works in SilverStripe, you should be able to use the same code, just create articles in the language, and the method that gets the articles should only return articles written in the current language.

Avatar
cabrilo

15 October 2008 at 9:16am Community Member, 3 Posts

Simon,

Thanks, but how can I write an article in any language? i.e. without doing a translation?