Viewers: in countries Watching now:
Author Tom Geller demonstrates how to create and publish a complete web site with the powerful tools in Acquia's hosted service, Drupal Gardens. The course shows how to leverage the pre-built page layouts and add custom styling using the ThemeBuilder tool; integrate rich site features, such as surveys, user ratings, and media galleries; and push content to Twitter and Facebook. The course also covers transitioning from a Drupal Gardens site to a self-hosted Drupal site. Exercise files are included with the course.
One difficulty in creating something for the World Wide Web is that, well, it's worldwide. That means that if your site is successful, your content will be seen by people in many different time zones, speaking many different languages, and using many different date and currency formats. How much you want to adapt your site to them is up to you, but whatever you decide, Drupal Gardens is already set up for it. Just to be clear about terminology, Drupal Gardens is what's called "internationalized software." If you decide to take advantage of that feature, you'd be localizing your site to make it friendlier to people in various locales.
Now internationalization and localization are very big subjects and much too big to cover in one video. I'll show you where the controls are in Drupal Gardens. Actually, making them work to their fullest extents is a much bigger subject. At the end of this video I will show you some additional resources that will give you more help. Let's start by taking a look at the basic internationalization controls that are already enabled in Drupal Gardens. To do that, we go to Configuration and then scroll down to Regional and Language.
Here we see Regional settings and Date and time. I won't go into great detail, but you can see that you can set a default country, first day of the week, time zone, and so on. These things, believe it or not, vary quite a bit from country to country. In some places, for example, Monday is considered the first day of the week, while in others Sunday is, and that comes into play when you start dealing with date-related information, but for us we'll just get out of this screen. Similarly, if you change the Date and time formats, it will look right to people in whatever area you're trying to appeal to.
So those are the basic non-language settings. To actually get started translating your content into other languages, you will need to enable a couple of other modules. These are the Locale module and Content translation. We will start by just doing the first one, the Locale module. Go up to Modules and scroll down. It's in the Core group, so not too far down. Then scroll down and Save. When that module is on you will see additional controls under Configuration, in that Regional and Language group.
These are Languages and Translate interface. First, I'll click Languages. Now, right now our site is only set up for one language, English. I am going to add a language to that. I'll add the only other one that I know fairly well, Esperanto, and Add language. There are quite a lot of choices on that list though, and if you wanted to you, could even add a language that's not on that list. That's more complicated than we can describe here, but it is possible.
Now that we have our two languages, we want to tell to Drupal Gardens when to use one or the other, and how to present those languages to the user. So I go up to the Detection and Selection tab here in the right corner. There are several different ways the Drupal Gardens can present these different languages to you. For example, it could look at the user and decide, well, what does the user's browser say? What did the users say in their profile on Drupal Gardens? Or it could just use the default site language. I am going to use the URL.
I will click that to enable it, and then I'll show you some of the configuration options. Once again, Detection and Selection, and Configure. There are two different ways that you can change the URL to show what language is being used. One of them is in the domain. That would be eo.explorecalifornia, et cetera, et cetera. The other one is by changing the path prefix. So it would be explorecalifornia. drupalgardens.com/eo and then the rest of the path. I am going to leave it as the Path prefix. So now we've configured our site to show two different languages.
The next thing we are actually going to do is start translating our content. Before going on there I want to warn you away from something that can be a little confusing. If you go up to Configuration and scroll down again to that Regional and Language area, you see this Translate interface link. That actually doesn't let you translate your site; instead, that's so that you can translate Drupal's interface itself. So instead of "people" here, it would be "homoy," which is the Esperanto word for people.
So what we have to do is go back to Modules and turn on the Content translation module, and then scroll and Save. All right, we're almost there. We can't yet start translating content until we do one last thing. Content translation is only available for content types that you've enabled it on. By default, it's not on any of them. So, the way we change that is go up to Structure and Content types, and in my case I'm going to make the tours available--that is, the Tour content type-- available for people in both English and Esperanto.
So I go to Tour and click edit. If you need more help with this area, by the way, see the video on creating and managing content types. As we scroll down and click Publishing options, you will notice some additional options. This multilingual support is disabled right now. I'm going to enable it, with translation, and then save the content type. Now we're finally ready to start our translation. To do that, we will go back to any node of the Tour content type. I know that if we go back for homepage and look down here, we have a simple view that we set up earlier on which shows all of the tour nodes.
So I'll just click on this Big Sur Retreat. When we click Edit on this node, we notice a new option, which is down here toward the bottom, and it says, what language is this in? In this case, instead of being simply language-neutral, we know that this one is English, so I will change it to English and then click Save. Now I want to produce the Esperanto version. Once I name this one as a specific language--English--a new tab appeared: Translate.
By clicking the Translate tab, I can now add the translation in Esperanto for this node. What I will do is I will just say "Retreto al Big Sur," and then of course I would change the body as I wanted: "Granda promenado en Big Sur." Excellent! And of course, the language is Esperanto, and we save it.
So now we're back, and we are looking at that node. This one is in Esperanto. As we scroll down, we see there is a tag at the bottom in English. Ah! We can switch back and forth between the English and Esperanto versions very easily. Just look at one. If we want to the other, we click on the tag; now we are on the English. And back again. Very easy. I do want to mention one little oddity that comes up when you start translating nodes: If you have these grouped into any sort of collection of nodes such as you would in a simple view, it'll show up twice, and we could see that by going down to our little block down here.
See we have both Big Sur Retreat and Retreto al Big Sur. Well, that's not necessarily so bad because, of course, somebody might want to be looking for it in Esperanto and not recognize the English. But again, you should just be aware that that's one of the things that happened. I said at the beginning of this video that I would provide some additional resources, and here they are. I hope it's clear that internationalization is a complicated issue, and we have really only dipped our toes in the water here. I know that what I have shown was a pretty incomplete solution. Partly that's because we don't have the time to go into all the ins and outs of internationalization, and partly it's because getting a site to appear only in the visitor's preferred language isn't quite possible yet in Drupal Gardens.
But even the solution you have seen here is better than most available. I expect it to improve in the months and years to come.
There are currently no FAQs about Drupal Gardens Essential Training.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.