multilingual site without mambelfish

How to support more than one language on your site.

Moderator: General Support Moderators

Forum rules
Locked
lenamtl
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 238
Joined: Sun Aug 28, 2005 5:10 pm
Location: Montréal,Qc

multilingual site without mambelfish

Post by lenamtl » Sun Sep 25, 2005 3:27 pm

Hi,

I'm planning to do a bilingual site and I have seen this hack.
http://www.greatpixels.com

This is a very interesting way to do it without mamblefish.

this is the post I'm referencing to:
http://www.mambers.com/showthread.php?t ... =bilingual

I need help to implement it.

Thanks
Lenamtl

lenamtl
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 238
Joined: Sun Aug 28, 2005 5:10 pm
Location: Montréal,Qc

Re : multilingual site without mambelfish

Post by lenamtl » Thu Sep 29, 2005 12:58 pm

Hi,
I have also found this tutorial, sorry I forgot to took the author name  :-[
==============================================

Making Mambo multi-language without using Mamblefish

I was asked to finally deliver the details of the method I use for making Mambo multi-language so here it is 

It's not perfect, it might not suit your needs or maybe it's to complex for you I don't know. I don't offer any guarantees and complaints are ignored, it works for me and it might work for you.

The essence of the method I'm using is several installations of Mambo that are symlinked to one master installation. This means that you have an administrator environment for every language! No easy way around this untill Mambo has become fully multi-language itself. Until that time I'm using this method, I like it better than Mamblefish but again that's for everyone else to decide for themselves.

Ok, let's start with the tutorial.

First off determine what languages you're going to support, you can add languages later but you have to have some idea on where to start. I created a website with 7 languages so I think I have a fairly complex setup. Let's assume you're going to support two languages, English and Dutch.

I'm also assuming the following:
You're using a shared hosting infrastructure
It's Linux based
All actions are carried out on the host server (afterwards you can make a backup to your home PC or server)

If your conditions differ from this you need to interpret this tutorial to suit your situation, especially if you're hosting on Windows.

1.
Create a top level structure for your Mambo installation using the ISO abbreviations for your languages:

/en
/nl

(You can use terminal access, SSH, your favorite FTP client etc ... doesn't matter)

2.Determine which language folder is going to be the master installation. I normally take the English folder as the master folder.

3.Download a recent copy of Mambo (this tutorial is based on Mambo 4.5.1a, later versions may not apply!) and unzip it in the master folder, /en in our tutorial.

4.Open the mambo.sql file in the /installation folder of your master folder.

Save the mambo.sql file as mambo_en.sql. In the mambo_en.sql file you'll find many instances of the #__ prefix.

Replace this with a language specific prefix, i.e. mos_en_ for instance using global search and replace with a good text editor.
Import the modified mambo_en.sql file in MySQL (instructions for manual installation are included with the Mambo documentation). After you have succesfully imported the modified mambo_en.sql file open the original mambo.sql file and save it as mambo_nl.sql (Dutch being our second example language). Repeat the same modifications, ie replace #__ prefix with mos_nl_, import in MySQL etc ... Do this for every other language you want to include. You have now initialized the database with all the required languages.

5.
Move to the root of your slave folder, in our tutorial /nl. Now it's time to symlink those files so you can have a language specific installation without using too much space (always an issue with shared hosts) and safeguarding against “drift” in the PHP files (you change something in /nl and forget to make the same change in /en).

Here's how you do it, from the root of /nl starting with symlinking the subfolders:
ln -sf ../en/components components
ln -sf ../en/editor editor
ln -sf ../en/help help
ln -sf ../en/images images
ln -sf ../en/includes includes
ln -sf ../en/language language
ln -sf ../en/mambots mambots
ln -sf ../en/modules modules
ln -sf ../en/templates templates

Now symlink several individual files:
ln -sf ../en/globals.php globals.php
ln -sf ../en/index2.php index2.php
ln -sf ../en/mainbody.php mainbody.php
ln -sf ../en/offline.php offline.php
ln -sf ../en/pathway.php pathway.php
ln -sf ../en/robots.txt robots.txt

Folders that can't be symlinked:
administrator
cache
media

You need to copy these folders over from the master folder to the slave folder, ie (from the root of /nl):

copy -R ../en/administrator
copy -R ../en/cache
copy -R ../en/media

Individual files that can't be symlinked:
configuration.php
index.php

You need to copy these files over from the master folder to the slave folder, ie (from the root of /nl):

copy -R ../en/configuration.php
copy -R ../en/index.php

6.Modify the configuration.php file to mirror the changes you made, ie:

/en/configuration.php
$mosConfig_dbprefix = 'mos_en_';
$mosConfig_lang = "english";
$mosConfig_locale = 'en_GB';

/nl/configuration.php
$mosConfig_dbprefix = 'mos_nl_';
$mosConfig_lang = "dutch";
$mosConfig_locale = 'nl_NL';

That's it for the language changes, don't forget to apply all necessary actions as described in the Mambo documentation per language installation!
Lenamtl

User avatar
Markku
Joomla! Explorer
Joomla! Explorer
Posts: 437
Joined: Wed Aug 17, 2005 10:17 pm
Location: Helsinki
Contact:

Re: multilingual site without mambelfish

Post by Markku » Fri Sep 30, 2005 10:44 am

Thanks for the info, lenamtl.
The original author is "postme" and he posted these instructions to old forum.
Finnish Translation Coordinator -
Member of the Finnish Joomla Translation Team  - http://www.joomlaportal.fi

User avatar
rainwebs
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Sun Oct 09, 2005 11:23 pm
Location: Eichenzell, Germany
Contact:

Re: multilingual site without mambelfish

Post by rainwebs » Mon Oct 10, 2005 12:41 am

Hi lenamtl,

why do you want to implement such things? You may support static text, but less flexible than with JoomFish (if it exists). Both implementations aren't trivial. Your question tells us that you can't do it on your own. Even for experienced Joomies both suggestions will be a challenge with the next major Joomla release. So, I suggest to wait for JoomFish.

Keep in mind: JoomFish allows to support multilingual support for all dynamic parts (e.g. topics in a forum component). I did a lot of adaptations with the Fishermamb's project the last year, because of these possibilites, and besides the still existing compatibility problems and missing core integration it was the right way.

If you wanna start now implement separate instances of Joomla for every language and migrate them after JoomFish is part of the core. I would create language-specific sub domains that can be changed though static flags in the site header.

Regards Rainer
Freeware for Halloween fans: http://halloween.jigetiser.com
Wallpapers, Screensavers, Posters, Calendars, Jigsaw Puzzles


Locked

Return to “Joom!Fish and Multilingual Sites”