I am new to Drupal and I've been mucking around with creating a multi-lingual site using it. I've installed Drupal 6.0 and I'm testing locally.

For starters and testing purposes I want to create a website in English (default-language), Hebrew, and let's just say for argument's sake Dutch (although it could be any other language).

After much mucking around I found out that the only truly bi-directional theme in 6.0 is Andreas and so I installed the Andreas-02 theme. Voila it works, and when I switch languages, making Hebrew my default language, even the left-sidebar menus switch from appearing on the left-hand side to the right-side - as it's supposed to! Great so far. (Just in case anyone is wondering... Garland - which is supposed to be a BIDI theme didn't switch from left to right like it's supposed... and so I had to abandon Garland for base theming of the site).

Next I defined Dutch as an additional language (although this could have been any other left to right language) - and set it as the default language. That worked too. Now I have Dutch defined as well.

Ideally I want to have a simple architecture for my website which looks something like Facebook, where what you have is a simple drop-down menu (that appears on the top right hand corner) through which you can select various languages and the index page switches to the appropriate language of your choice accordingly.

Now, I have done a lot of reading about Drupal multi-lingual websites on the web - but I couldn't find any practical case scenarios or concrete answers to a few of my basic questions. Besides there appears to be no comprehensive document on the subject.

I'm testing 6.0 so let's just say I seek 6.0 answers only.

So here go my questions:

1) Let's say that I want to include and have an English paragraph within some Hebrew node that I'm creating. How do I do that? Or vice versa. Within the same node (page, story, etc.) can I use multiple languages? For example a paragraph in English - then another paragraph in Hebrew - and then another paragraph in Dutch. How do you achieve the bi-directionality of it as well (in cases when it's needed Hebrew, Arabic, etc.)?

Do I have to do it through HTML or is there some other way of defining the language you are about to use? (When I tried to do it through HTML using the tag, the tag kept appearing the wrong way.)

Can I have words from multiple languages mixed in the same paragraph? (Sort of like Microsoft Word can do)? Seems to me an important feature as one often needs to mix words from different languages in the same sentence.

2) I'm less concerned about having website administration and translation in various languages for administration purposes. The bulk of the Drupal multi-lingual discussions I've seen so far, seems to emphasize changing the administration interface to various other languages.

Now, also from what I have gathered so so far.. there seems to be no clear distinction between having a drupal website in different languages from an "administration perspective" and from a multi-lingual "content perspective". I think these should be regarded as two separate things. (Most website administrators I assume know English, whereas Internet browsers probably do not - so the latter seems to be more important - and is information I'm interested in.)

The question is:

Q: Do I have to change the "default language" through the adminstration interface, each time you want to add "content" in a different language? It seems to me that the "default language" and "content language" are two completely different things - and should be kept separate. Additionally the "default language" has administration connotations. Why can't I just create nodes and switch, without having to go through the administration interface - and changing the default language each time I want to work in a dfferent language?

Q: Do I have to change the default language through the adminstration interface, each time I want to add "menus" in a different language as well?

4) Basically since I want to have a website in different languages based upon on user selection criteria, I don't really think use of the word translation is appropriate in this case. It seems to me that they are for all intensive purposes three or four separate websites. Many of the references I've seen so far vise a vie Drupal emphasize the translation aspect.

Nevertheless, I failed to find any good practical Drupal examples of translations. If there are any out there can anyone point me to them? I'm looking for practical examples.

5) I understand that in order to have a different home page that's different from the rest of the site, I need to create a new page_front.tpl.php file. Let's say that my page_front.tpl.php defaults to English.

How do I go about defining home pages for the other languages involved? Are there any examples I can be referred to on the net? It seems to me that this is a basic setup - and deserves an example application. Are there any complete top-to-bottom example applications of this?

Can anyone point me to a language/webpage selection snippet where webpages are changed based on user selection basis? What are the language variable I need to check for? At what point is the language variable defined - and by whom? What other language variables are there? What is the lifecycle of a language variable? What are multi-language website work best practices?

Hopefully after some answers, this email will be useful to others as well.

Many thanks,
Mo

Comments

cpelham’s picture

By default, Drupal uses UTF-8 encoding. You can pretty much mix and match characters from different languages within the same node or node title as you like. However, in order for your site visitors to view them correctly, they will have to have the respective fonts installed if you are using languages with different character sets or they may see question marks or other strange characters.

That said, I have never tried right-to-left text so I am not sure if you can mix and match that. I would say that you should be able to if you wrap each different (right-to-left if left-to-right is your norm) paragraph or block of text in a div or span tag and use css to control the text direction:

div
{
direction: rtl
}

You do not have to have currently selected, let's say Spanish, for your navigation or display in order to create a node that is to appear only on pages on which the display of only Spanish content is desired. There is a drop-down box to select which language should be associated with the node you are creating. However, if you wish to associate certain taxonomy terms with a node and those terms are themselves associated with a particular language, then those terms will only be available for you to add to your new node if you are in that same language. That is meant to be a feature I believe, but I find it a bit of a nuisance myself.

I have not been able to find a neat way of having different home pages for each language. It's automatic if you want the same layout, same views, etc. on each home page and simply want each to only display content that is available in selected language. We resort to a splash page with links to the respective home pages, but there must be a php snippet to do this more elegantly.

—————————

Christopher Pelham
Director
CRS (Center for Remembering & Sharing)
123 4th Ave, 2nd FL
New York, NY 10003
212-677-8621
www.crsny.org

momo18’s picture

Hi,

1)

You mention that there is a drop-down box to select which language should be associated with a particular node you are creating - but I don't see it. I am working in 6.0 and I have setup and defined several languages on my system.

>> There is a drop-down box to select which language should be associated
>> with the node you are creating.

Perhaps this requires installing an additional module or something, as I don't seem to have this capability. Could you elaborate the steps required to access or how I can use this feature? Perhaps it is a 5.x thing or a module that I'm required to install?

2)

Second, perhaps someone can follow-up your post and describe how one can have different home pages each one associated with a different languages. Preferably, where when your website is accessed it lands on a default language, and from there you can select which home page language you want to use?

3)

Also, could you describe in a little more detail or provide the snippet as to how you created a splash page and then defined the links to various home pages of different languages? If what I intend doing fails, perhaps I will have to use your method.

Thanks,
Mo

elizas’s picture

Prepare a Rock Solid Test Environment and Use it
For a Website hosted in English and Japanese Language, it’s not a ball in the browser’s court to change the language of the browser and run the desired test scripts for it. So there comes the need of 2 machines with different language settings in the Desired OS. This is required as users from different countries install OS with their choice of language and generally don’t change their language settings to view a website.

Knowing the Language or having a language translator is a must
If a Speaker of the desired language, belonging to the same region is usually the best person to help in translations, but if it’s not the ball in your court, then use of different translation websites are available like wordreference.com, googletranslate.com, dictionary.com. It is always a good habit to compare results from different translation websites.

Get Maximum Knowledge of the Website
If the functionality for the website with all the business rules for the application is dead clear to you then changing language and checking for functionality for the website with other languages will be a low level headache and will explore the doors as how to test in other language versions.
http://www.mindfiresolutions.com/Test-a-Websites-Compatible-with-Multipl...