5415 Posts in 1651 Topics by 1188 members
|Go to End|
2 March 2009 at 11:39pm Last edited: 2 March 2009 11:41pm
I've set up Internationalization on my SilverStripe installation with:
... and it works like a charm. My question is, is it possible to have a fallback language?
1. Let's say my main menu looks something like this in English:
|- About Us
2. I translate the Contact page to the norwegian title "Kontakt"
My main menu, when setting locale to Norwegian on the site, will currently look like this:
As a result, the english articles are hidden, as the site (naturally) only shows the translated pages to the current locale.
Is it possible to specify a fallback language, that my menu may look like this?
|- About Us
3 March 2009 at 3:51pm
You're using our daily builds/trunk, right?
Hm, currently not possible, but would make sense. We have a similiar module (subsites) which can link pages between different "subsites", which is essentially the same as different translations of the same page. Technically, it will be challenging to get these fallbacks working without having them explicitly created.
So, couple of options worth investigating:
- globally enable fallbacks automatically through a code-preference (selecting both translated and untranslated pages)
- explicitly creating placeholder pages as a "VirtualPage" (showing untranslated content, no redirect). we could have a checkbox on "create translation" button to optionally create this placeholder instead of a full-fleged editable translation
- batch-creating placeholder pages for the whole site or a specific sub-tree through some user action
Sorry if this goes too much into depth, I'm basically kicking off discussion about the implementation. Our first goal will be to get Translatable in a stable and tested state, so don't expect any work on placeholder pages in the next month or two - unless we get help/contributions of course.
6 March 2009 at 2:42am
Thank you for your elaborate answer. Very interesting. In my case, I've solved it in the short run by convincing the client to translate every page
The creation of virtual placeholder pages is a good idea - this will solve the issue for those in a more precarious need for this functionality.
Your first option definately seems like the easiest solution for the developer, using SilverStripe. If it's the easiest solution to implement for the SilverStripe framework developer... well that's another discussion
I will also have a look to see what can be done.
5 November 2011 at 1:53pm
I am wondering what is the status of this problem/discussion as I have exactly the same issue. My client is looking at SilverSTripe
to create a large website in multiple languages (using Content localization and the Translatable class). But all the pages
will not be translated in all the languages. However they would like visitors to always have access to all the pages : each page
would be served either in the "locale" language if it has been translated on in the "default" language if it has not.
Is it possible? How can this be implemented?
|Go to Top|