Change language and keep context, how to?

Author Message

Pierre Tissot

Monday 02 June 2008 1:33:50 am

Hi

I have a multilanguage site, based on the ez url translations. I want that when users change the language, the context of the page stays the same. Currently I send him back to the homepage.

Must be simple, but I don't know how to.

PiR

Maxime Thomas

Tuesday 03 June 2008 10:37:40 pm

You have to redirect them to the right uri and not the homepage.
E.G. : you are on /company/product, you change of language, you go to the homepage.

In eZPublish, multisites with different languages are specifies by their different siteccesses, one by language. So you just have to concat your language siteaccess with the know url of the current page.

So, you must edit the flag template and edit the links to have this.

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

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

Main resources:

Total runtime0.0191 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0089 589.1484152.6406
Module start 'layout' 0.00890.0029 741.789139.4766
Module start 'content' 0.01180.0048 781.265689.3672
Module end 'content' 0.01660.0025 870.632830.3047
Script end 0.0191  900.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003317.2660140.0002
Check MTime0.00147.1513140.0001
Mysql Total
Database connection0.00105.167810.0010
Mysqli_queries0.003518.533030.0012
Looping result0.00000.083610.0000
Template Total0.00189.210.0018
Template load0.00094.890710.0009
Template processing0.00084.304010.0008
Override
Cache load0.00073.523910.0007
General
dbfile0.00031.604080.0000
String conversion0.00000.047440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs