problem generating urls for multilingual

Author Message

Alexandre Cunha

Tuesday 25 July 2006 11:34:18 am

I have setup a multilingual site.
Have siteaccess settings configured, like this

site.com/index.php/en
site.com/index.php/pt
site.com/index.php/nl

Works fine.

Have build a menu to choose the language.
Each link for this menu, haves:

href={"/en"|ezurl}>
href={"/pt"|ezurl}>
href={"/nl"|ezurl}>

Buts this unfortunettly generates links with duplicate siteaccess, like this:

site.com/index.php/en/pt
site.com/index.php/en/nl
...

How to replace the siteaaccess from the url ?

Thanks for your help

http://AlexandreCunha.com

Marcin Drozd

Tuesday 25 July 2006 2:07:49 pm

Hi
U can use:
href={"index.php/en/"|ezroot}>
or better
href={concat("index.php/en/",$uri_string)|ezroot}>

http://ez-publish.pl

Alexandre Cunha

Tuesday 25 July 2006 2:59:38 pm

Hi Marcin

Thanks for your valuable help.

href={"index.php/en/"|ezroot}>
or better
href={concat("index.php/en/",$uri_string)|ezroot}>

This works perfect!

However, my developement machine the url needs "index.php" but the production site needs "index.php?". I need a more universal solution including for servers not needing the "index.php".

There is another sugestion without hardcode "index.php" or "index.php?" ?

Looking in the documentation, dont have found nothing about $uri_string.
Where I can find more nfo about this var and other uri/url related vars ?

http://AlexandreCunha.com

Kristof Coomans

Wednesday 26 July 2006 1:24:57 am

Hello Alexandra

Take a look at http://ez.no/community/forum/setup_design/available_languages_for_objects_in_3_8#msg99898 and http://ez.no/community/forum/setup_design/how_to_select_language/

I would go for the INI solution. It's the most flexible if you ever have to change your setup.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

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 19:18:11
Script start
Timing: Jan 18 2025 19:18:11
Module start 'layout'
Timing: Jan 18 2025 19:18:11
Module start 'content'
Timing: Jan 18 2025 19:18:11
Module end 'content'
Timing: Jan 18 2025 19:18:11
Script end

Main resources:

Total runtime0.7474 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 588.0469152.6406
Module start 'layout' 0.00750.0022 740.687539.4766
Module start 'content' 0.00970.7361 780.1641586.5391
Module end 'content' 0.74580.0016 1,366.703112.1250
Script end 0.7474  1,378.8281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4728160.0002
Check MTime0.00130.1754160.0001
Mysql Total
Database connection0.00110.153310.0011
Mysqli_queries0.688992.1716620.0111
Looping result0.00070.0876600.0000
Template Total0.709194.920.3545
Template load0.00210.278320.0010
Template processing0.707094.588720.3535
Template load and register function0.00020.021810.0002
states
state_id_array0.00150.196810.0015
state_identifier_array0.00190.251320.0009
Override
Cache load0.00170.2303340.0001
Sytem overhead
Fetch class attribute can translate value0.00070.087530.0002
Fetch class attribute name0.00110.140850.0002
XML
Image XML parsing0.00080.102330.0003
class_abstraction
Instantiating content class attribute0.00000.001350.0000
General
dbfile0.00090.1168160.0001
String conversion0.00000.000940.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/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: 25
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs