Forums / Install & configuration / I really need a step-by-step guide on how to setup a multilingual site

I really need a step-by-step guide on how to setup a multilingual site

Author Message

Cel Kukec

Tuesday 27 January 2004 2:05:33 am

The "How to setup a Multilingual Site" guide in documentation section helps a little but I still can't make my site work. I almost finished Slovenian translation for eZ 3.3.2 and I like eZ CMS a lot so far, but If I'm unable to make my site work in Slovenian AND English I have to abandon my efforts.

What I did so far:

1.) Using Qt Linguist I've translated "\share\translations\untranslated\translation.ts" file and put it in the "\share\translations\slv-SI\ folder
2. Used "\share\locale\cze-CZ.ini file", modify it for Slovenian language and saved it as "slv-SI.ini" in the same folder.
3. Run the installation wizard, selected Slovenian as a default language and choose English as optional.

4.) The site works fine in Slovenian language!

5.) From here I need step-by-step instructions what to do next to achieve:
www.mysite.net/index.php/slv for Slovenian interface user site
and
www.mysite.net/index.php/eng for English interface user site
functionality.

Please help!

Kåre Køhler Høvik

Tuesday 27 January 2004 3:57:21 am

Hi

This topic has been discussed here :
http://www.ez.no/community/forum/developer/multilingual_site_images

--
Kåre Høvik

Kåre Høvik

Cel Kukec

Tuesday 27 January 2004 7:08:41 am

Thanks, but I've been there already and still many things remain unclear. This question is so popular but still no "easy to understand guidelines".

Am I asking too much?

Help.

Lazaro Ferreira

Friday 30 January 2004 3:16:15 pm

Hi,

This is our step by step multilanguage setup

Requisites :

If you installed EZP 3 using the normal installation (using the wizard) and tell the installer that you will use two languages, for example English and Portuguese, and the name of your user side site is 'en' (short for English), then at the end of installation you got the file

settings/siteaccess/en/site.ini.append that should included something like this :

[ContentSettings]
TranslationList=eng-GB;por-PT

To create a truly bi-lingual (or multilingual) site you will have to create a siteaccess for each additional language that you need

Here the steps to setup a second language in your web site, this is based on our site, so we will use portuguese language to demo

1) Create a new directory under settings/siteaccess, we called 'pt'
2) Copy every file under settings/siteaccess/en/ to settings/siteaccess/pt/
3) Check ownershihp, dir and file permissions on and under 'pt', they should match it on and under 'en'
4) Create a new directory pt under design (you should already have and 'en' directory under design created by ezp installer)
5) Create a directory for overriding images used in the portuguese site, you should already have a design/en/images directory so create a design/pt/images
6) Check in 4 and 5 (step 3)
7) Edit your site.ini.append under pt, changing the following lines:

[SiteSettings]
SiteURL=my.domain/index.php/en

[DesignSettings]
SiteDesign=en
AdditionalSiteDesignList[]=

[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB

to:

[SiteSettings]
SiteURL=my.domain/index.php/pt

[DesignSettings]
SiteDesign=pt
AdditionalSiteDesignList[]=uk

[RegionalSettings]
Locale=por-PT
ContentObjectLocale=por-PT

8) Edit your general override settings file at settings/override/site.ini.append
[SiteSettings]

DefaultAccess=en

SiteList[]
siteList[]=en
SiteList[]=pt

[SiteAccessSettings]

AvailableSiteAccessList[]
AvailableSiteAccessList[]=en
AvailableSiteAccessList[]=pt
AvailableSiteAccessList[]=admin

SiteAccessList[]
siteAccessList[]=en
SiteAccessList[]=pt
SiteAccessList[]=admin

9) Clean all EZP caches

Now you have setup the basis for a truly bi-lingual (or multilingual) site

Check it, opening your main and secondary SiteUrl in you browser, you can translated some content, or use the i18n() operator in your template for some hard coded text

The principle is that for opening the SiteURL: my.domain/index.php/pt, EZP will use the templates and images in design/pt if available, else they will use the desing/en templates and images, as design/pt is already empty (no .tpl file and no image files) it actually uses your design/en templates and image, until you add images and templates to the design/pt dir

-----------------------------------------------------------------------------
Regarding the i18n() operator, it will use the .ts file for the language of your siteaccess (defined in your site.ini.append see 'RegionalSettings' at step #7 ), I think is that simple
if it doesn't find the translation string, it will default to the hard code text, normally it is the text in Eng-GB, because EZP uses Eng-GB as its default language
-----------------------------------------------------------------------------
To add translations you should use the translation system, the translation system, have a command line tool that goes through your web site .tpl files adding every i18n() hard code text to its database ( the .ts file ), (all of them are stored as Eng-GB text), after that you run its editor (a GUI application) that helps you adding your translations for every term added before, finally the editor will save your .ts file, this is the one you should copy to your web site at share/translations/your_language/translation.ts

More information on this at: http://ez.no/developer/ez_publish_3/translations

I'm sorry if I have missed something about the .ts translation, I'm not in charge for this in my team, so I'm learning also :-)

Lazaro
http://www.mzbusiness.com

Stéphane Cloutier

Wednesday 24 March 2004 10:59:52 am

I'm using ezp version 3.2-4 to publish a trilingual website. Evrything works fine there.

I'm now trying to run another trilingual website at http://inuktitut.net/index.php using ezp 3.3-3 without much success. I configured my override and siteaccess ini files according to instructions.

When I change the locale for Inuktitut or French

[RegionalSettings]
Locale=iku-CA
ContentObjectLocale=iku-CA

[RegionalSettings]
Locale=fre-CA
ContentObjectLocale=fre-CA

Then, it takes over 30 seconds to access a templateless web page.

Here is my override site.ini file :

[SiteSettings]
DefaultAccess=english
SiteList[]
SiteList[]=english
SiteList[]=francais
SiteList[]=inuktitut

[SiteAccessSettings]
AvailableSiteAccessList[]
AvailableSiteAccessList[]=english
AvailableSiteAccessList[]=francais
AvailableSiteAccessList[]=inuktitut
AvailableSiteAccessList[]=corporate_admin
SiteAccessList[]
siteAccessList[]=english
SiteAccessList[]=francais
SiteAccessList[]=inuktitut
SiteAccessList[]=corporate_admin

Ez System try to find translation.ts for eng-CA, which is not on the server (couldn't find it on ez.no).

English (Canada) : http://inuktitut.net/index.php/english/
French (Canada) : http://inuktitut.net/index.php/francais/
Inuktitut (Canada) : http://inuktitut.net/index.php/inuktitut/

Qupanuaq - Snow bunting

Lazaro Ferreira

Wednesday 24 March 2004 4:00:28 pm

Hi,

I have looked at your URLs, the debug output at your /english URL shows no translation file (translation.ts) was founded

I haven't found eng-CA translation also (in our own setups)

So I think you should find or create a eng-CA translation of your own, or use eng-GB settings that is EZP default, for the English site this should be your first step

You can change your /share/locale/eng-CA.ini as :

[RegionalSettings]
TranslationCode=eng-GB

Regarding the time to access your page I did get slow response for Inuktitut (near 30 secs), but a good response for fre-CA (under two seconds is quite good)

I think the problem with the Inuktitut translation may be (beside the own translation.ts file) in the settings for the charset (check it at your /share/locale/iku-CA.ini )

The codepages (charset) to be used with this language, should be supported, are you sure you have set the right charset for this language ???

It seems that there is not templateless web page, what is happening (the debug said) is that in the non English site, EZP can't find the images and CSS files

You need to ensure that your sites will default to the English site images and CSS files
adding this line in your settings site.ini.append files for fre-CA and Inuktitut language

[DesignSettings]
AdditionalSiteDesignList[]=english //replace for your english design folder real name

Hope this help

Lazaro
http://www.mzbusiness.com

Stéphane Cloutier

Wednesday 24 March 2004 10:01:18 pm

Motto bene ! Gracie !

Thanks Lazaro ! I took bad inroads right from the beginning. You helped me realize simple things I did wrong.

First, for the Inuktitut, I renamed the untranslated folder to iku-CA, but without translating anything in it. That was causing most problems. I deleted iku-CA translation folder, and just use TranslationCode: eng-GB in my locale file. I would plan to do a full Inuktitut translation later.

As for the English, using eng-CA wasn't causing any problem in version 3.2-4, although there was no translation folder under that code. I wonder what is different now.

Qupanuaq - Snow bunting

Stéphane Cloutier

Wednesday 24 March 2004 11:11:02 pm

I had to go back to eng-CA as eng-GB was interfering with the backend translation manager. If I wanted to add an Inuktitut translation to one of my page, bacause TranslationCode was eng-GB, the system would give me the eng-GB form to fill out. I set my locale back to iku-CA and eng-CA, and duplicated an already translation folder for iku-CA. Things work fine that way.

Qupanuaq - Snow bunting