This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » really i need help about ulr_alias &...
expandshrink

really i need help about ulr_alias & language !!!

really i need help about ulr_alias & language !!!

Tuesday 06 May 2003 7:56:25 pm - 12 replies

Hi ..

1. why when i switch to another language when the link is url_alias i got error that module not fond ?
(ie. htt://localhost/ez3/mydesign/index.php/testfolder/testarticale/GER-de)

2. the primary language for the site is eng-GB, when user switch to GER-de language, he got the artical in dutch, nice, but when he click on another link he will return to the primary site language, is there any why to avoide this, let say by passing the language settings to the links ?

please i need to know, coz i may stoping my site developing with ez3 if there are no way to do this !

Tuesday 06 May 2003 9:46:37 pm

I didn't quite understand your first question. Can you explain?
I just know, that ezP gives some strange error, when you try to see an object in a language, that does not exist.

For the second:
Do I get you right: Your user changes "his" language (how does he do, this, btw?), but looses the language, when he moves on?
That _must_ work in some way. Where are the multi-language gurus? How does the system handle the user's language choice? I guess, I would do this by saving the language in the user's session cookie and/or let him save it in his preferences (that is: in the user's user object... only working for registered users, of course). What is the concept here? Can someone give us a link?

Tuesday 06 May 2003 11:44:01 pm

hi ..

1. when i don`t use url_alias, the language will work, so the url will be like this :
htt://localhost/ez32/index.php/demo/content/view/full/33/GER-de

2. let say the user is reading this aricale with x language :
http://www.ez.no/content/view/2222/GER-de
ok ?
now, all links in this page must include the language code, so let`s the hame link :
http://www.ez.no/GER-de

in this way the user will not need to jump from language to another to read what he like !

i think the best way for the point 2 is to make template for each language!

Wednesday 07 May 2003 1:43:54 am

HI

I made a site in 2 langs, and the best way to do that i think is create one siteaccess for each language. Something like http://site/demoeng and http://site/demoger. In each siteaccess use the corresponding content code.

Wednesday 07 May 2003 11:07:40 am

and what about the templates ?

are u using 1 template for 2 language ?

is this work for u : when u reading artical 'Good News' with en language, and from there u change the language , what u will get ? the same artical with another language ?

i had check this site www.hio.com , when u change the language will return the start page.

is ur site online, just wanna see how is going online !

Wednesday 07 May 2003 7:53:10 pm

I only have 1 template for both.
To change to another language insert the link ex: http://site/demoeng/content/view/{$module_result.node_id}. This change the browser to another siteaccess.
This is a very basic example.

i use 1 virtual host for each language, ex: http://www.site.pt , http://www.en.site.pt.

BTW there is a simple problem with multilanguage sites in ez3 for now. Node name isn't translated (I bug reported in http://ez.no/developer/ez_publish...orts/nodename_of_translated_versions ). I hope this problem is corrected but for what i seen in svn is not sad.gif Emoticon , i haven't tested that again.

Thursday 08 May 2003 10:25:36 am

last thing ..

so i need to change something from site.ini, if yes would u pls post here ?

thx agian blunk.gif Emoticon

Thursday 08 May 2003 11:57:11 am

HI

In my example i use 3 virtual hosts (1 for admin, and 2 for the 2 languages), so in settings/override/site.ini.append.php added in SiteAccesSettings sections the next lines
HostMatchType=map
HostMatchMapItems[]=www.site.com;www_site_com
HostMatchMapItems[]=www.en.site.com;www_site_com_en
HostMatchMapItems[]=admin.site.com;www_site_com_admin

Now create the www_site_com, www_site_com_en and www_site_com_admin is settings/siteaccess with a site.ini.append file in each directory, where you have to change this
[RegionalSettings]
Locale=por-PT
HTTPLocale=pt-PT
ContentObjectLocale=por-PT

Don't forget to add each files the database (the same) in these 3 files, and to define the same var , cache, and storagedir .

Read this doc http://ez.no/developer/ez_publish.../several_sites_with_one_installation that should be helpfull, because this is nothing more nothing less than an 1 instalation with multisites

hope i helped

Paulo Almeida

Thursday 08 May 2003 12:34:01 pm

Thx alot agian !

i`ll test after i finish from new datatype happy.gif Emoticon

Thursday 08 May 2003 12:38:34 pm

ohhh .. i forget something !

i don`t know yet why the language want work with url_alias ?

i mean this will not work :
http://localhost/ez3/index.php/demo/testfolder/test_artical/en
http://localhost/ez3/index.php/demo/testfolder/test_artical/hu
http://localhost/ez3/index.php/demo/testfolder/test_artical/de

but with url_alias will not work ...

http://localhost/ez3/index.php/demo/content/view/full/234/en
http://localhost/ez3/index.php/demo/content/view/full/234/hu
http://localhost/ez3/index.php/demo/content/view/full/234/de

i got content module not found msg !

this mean the language option will not work with url_alias, or what ?

Thursday 08 May 2003 12:40:39 pm

When using url_alias you will only get the default language.

We have not added support for url_alias with mulitlanguage support.

Please come with suggestions to how this should work.

For now you need to use /content/view/full/42/language/eng-GB for translations.

--bård

Thursday 08 May 2003 2:17:51 pm

as fetching the url, u get the template folder, content, view, and class name (full) , i think with the same way can get the language !

or maybe you should use preg_match, and for each language will be a code, to be sure this will not be used as artical name or what ever, and if preg match is true then set the language !

am sure your more expert than me with php, but my idae will look like this :

if(preg_match($REQUEST_URI, "en_lang"blunk.gif Emoticon
{
// code to set the language to english //
}
elseif(preg_match($REQUEST_URI, "de_lang"blunk.gif Emoticon
{
// code to set the language to dutch //
}
else
{
// get the defualt language from site.ini//
}

what you think ?

Monday 18 August 2003 8:31:39 am

Just a question:

For what i need HTTPLocale ?
I setup a bilingual content site but HTTPLocale remains empty.

Thanks Paulo, great explanation.

axel

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from