I know Drupal Gardens doesn't include Internationalization module nor other multilingual goodies or contributed modules, which makes sense to me since i18n is not really and end-user-friendly kind of animal. However I've heard that because of that you cannot build a multilingual site with Drupal Gardens and this may not be entirely true. Have you heard about the guys that didn't know it was impossible so they did it?
So, since Drupal is so powerful and flexible, that they say ;-), I was wondering how hard it could be to build some basic multilingual web site only with the modules and features they provide with Drupal Gardens. Let's see... you have all Drupal core -which includes Locale and Content translation-, you have Views, you have Pathauto, then you have Block visibility options which are more flexible than some people imagine... It seems there are some features missing but we'll try to substitute that with some.. imagination.. (that you may call ugly workarounds too).
I am not recommending nor discouraging Drupal Gardens as a platform for building multilingual Drupal sites. Also I am not affiliated with Drupal Gardens or Acquia in any way. I just happen to know personally some people that are part of their engineering team, all of them great Drupal developers, but I don't know what they may think of the solutions or workarounds described here. We are just exploring options and seeing how they work, ok?
Then let's go, step by step:
First of all you obviously need to have at least two languages defined so let's start configuring the Drupal core modules we need. If you don't know what I am talking about, possibly you need to start by some more basic Drupal or Drupal Gardens tutorial.
At this point we should have a basic 'multilingual' site on which the UI strings change from one language to the other when you click on the language switcher. However, those are not your content so you should keep seeing most of the page (Blocks, nodes, etc..) still in the original language of the site or in the language you created them. Since we don't have Internationalization module we are going to need some help to handle menus, blocks and content displayed on the page for every language. And here is where it becomes a little tricky.
To handle navigation and block visibility we are going to use some Helper Vocabulary and Pathauto. This is a vocabulary that is just 'internal', that is, not to be displayed anywhere. It must have a name for each content type and language and later on, besides setting the right language for each content, you'll set the right term of this vocabulary for it too. Mine looks like this:
Yes, we are using known prefixes for all of our nodes, that are different for each language. This will allow us to use that prefixes for block visibility so we can create a block for each language and it is displayed only with the content on that language. Then next step should be creating different blocks for each language and use these paths for block visibility. In my example, a Spanish block, will have these visibility options:
Show block on specific pages / Only the listed pages inicio noticias noticias/* paginas paginas/* productos productos/*
And an English block will have these:
frontpage news news/* page page/* products products/*
Of course you can use only some of these paths so the block shows up only for specific content or sections. There are some paths in there not yet explained, like 'frontpage' / 'inicio' or 'news' / 'noticias'. If you are guessing these are going to be views you are right :-) The front page is a bit trickier though so we let that one for the end.
If you've got this far, you should be able to see the UI switching language, mixed content with different languages and blocks that only show up for content on a given language. That is some progress towards our multilingual site, isn't it? Now let's go with node listing pages and views.
For the simplest case, that is getting some node listing for content for each language we are going to use a single view. Views does provide a nice language filter that only displayes content on the current page language.
Important Note From now on, when defining path aliases or creating menu items we may need to switch the Admin interface language to the language we are workign on at that moment to prevent some 'path not found' errors. If you miss the Language switcher block when on admin pages, you can set the path manually or start from a regular (not admin) page in the right language.
I am sure you already can guess how to do it, but anyway:
I said this was a bit trickier and it certainly is. A simpler case would be using a fixed node so it can have a translation but we want a node listing for it, don't we? I'm not explaining these steps but please follow carefully.
Language switcher block for front page
<li class="en first"><a href="/" class="language-link">English</a></li>
<li class="es last"><a href="/es/inicio" class="language-link active">Español</a></li>
Visibility: Only the listed pages:
And... Voila! We should be seeing some kind of simple multilingual site that displays the right content, blocks and menus for every language. Something pretty similar to this site. If you don't maybe you need to go back to our step by step guide or maybe I've forgotten some important detail. Please let me know posting a comment here.