really i need help about ulr_alias & language !!!

Author Message

Selmah Maxim

Tuesday 06 May 2003 10:56:25 am

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 !

Marco Zinn

Tuesday 06 May 2003 12: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?

Marco
http://www.hyperroad-design.com

Selmah Maxim

Tuesday 06 May 2003 2: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!

Paulo Almeida

Tuesday 06 May 2003 4:43:54 pm

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.

PACPI.COM Internet Consulting
http://pacpi.com

Selmah Maxim

Wednesday 07 May 2003 2: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 !

Paulo Almeida

Wednesday 07 May 2003 10:53:10 am

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_3/bug_reports/nodename_of_translated_versions ). I hope this problem is corrected but for what i seen in svn is not :-( , i haven't tested that again.

PACPI.COM Internet Consulting
http://pacpi.com

Selmah Maxim

Thursday 08 May 2003 1:25:36 am

last thing ..

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

thx agian ;)

Paulo Almeida

Thursday 08 May 2003 2: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_3/documentation/ez_publish_3/howtos/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

PACPI.COM Internet Consulting
http://pacpi.com

Selmah Maxim

Thursday 08 May 2003 3:34:01 am

Thx alot agian !

i`ll test after i finish from new datatype :)

Selmah Maxim

Thursday 08 May 2003 3:38:34 am

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 ?

Bård Farstad

Thursday 08 May 2003 3:40:39 am

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

Documentation: http://ez.no/doc

Selmah Maxim

Thursday 08 May 2003 5:17:51 am

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")
{
// code to set the language to english //
}
elseif(preg_match($REQUEST_URI, "de_lang")
{
// code to set the language to dutch //
}
else
{
// get the defualt language from site.ini//
}

what you think ?

Alexandre Cunha

Sunday 17 August 2003 11:31:39 pm

Just a question:

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

Thanks Paulo, great explanation.

axel

http://AlexandreCunha.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 04:07:49
Script start
Timing: Jan 18 2025 04:07:49
Module start 'layout'
Timing: Jan 18 2025 04:07:49
Module start 'content'
Timing: Jan 18 2025 04:07:49
Module end 'content'
Timing: Jan 18 2025 04:07:49
Script end

Main resources:

Total runtime0.7131 sec
Peak memory usage4,096.0000 KB
Database Queries93

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 588.0469152.6406
Module start 'layout' 0.00680.0029 740.687539.4766
Module start 'content' 0.00970.7016 780.1641778.7578
Module end 'content' 0.71130.0017 1,558.921928.1250
Script end 0.7130  1,587.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.5018160.0002
Check MTime0.00140.1913160.0001
Mysql Total
Database connection0.00120.161610.0012
Mysqli_queries0.610485.5960930.0066
Looping result0.00100.1451910.0000
Template Total0.678395.120.3392
Template load0.00260.363820.0013
Template processing0.675794.764120.3379
Template load and register function0.00020.028510.0002
states
state_id_array0.00150.209810.0015
state_identifier_array0.00130.178020.0006
Override
Cache load0.00250.34731100.0000
Sytem overhead
Fetch class attribute can translate value0.00140.192450.0003
Fetch class attribute name0.00180.2473160.0001
XML
Image XML parsing0.00190.262350.0004
class_abstraction
Instantiating content class attribute0.00000.0051180.0000
General
dbfile0.00120.1685290.0000
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
13content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
23content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
12content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 55
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs