Selecting a diferent language as user

Author Message

Paulo Almeida

Wednesday 26 March 2003 10:08:27 pm

I have had made post this questions before, but it was in beta versions, so...
Can anyone help me to create a link to select the site language. I tested a lot of addresses, like /content/view/full/xxx?Language=eng-GB , /content/view/full/XXX/eng-GB, and i doesn't work. I don't know if addresses are right but need to change something in config or use another address.

Thanks in advance

Paulo Almeida

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

Jan Borsodi

Thursday 27 March 2003 1:05:28 am

Using /content/view/full/XXX/eng-GB is only meant to change the viewed language of a content object.

Changing the site language per user is not supported yet, as it is now it is always read from site.ini. A user should be able to set a preffered language for the site and also the possibility to change language by url could be interesting. I'll see if this can be added as a feature in upcoming releases.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Zeno Streich

Thursday 27 March 2003 1:45:43 am

So in this situation i don't understand the idea behind the internalisation / language concept ? Should we create different site's for each language and navigate the user to there when he want's to select the language ?

@Jan: for my current project i have an additional need. a user should be able to select his prefered language in which the site should appear and also enable additional languages in which he well see content which is not available in the main language ;-).
Up to now i have found no system on the market with this feature.

regards Zeno

Paulo Almeida

Thursday 27 March 2003 2:04:44 am

So the only way to do this is create virtualhosts for all languages, configure the site.ini.php with hostmatchmap and change the locale settings for all VH.

Is there another way?
Will exist onother options/way to do this?

Sorry all that questions, and thanks

Paulo Almeida

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

Jan Borsodi

Thursday 27 March 2003 2:30:20 am

You should create one siteaccess per language and one for the main site. I would also suggest using url based siteaccess matching, that way you can easily add new languages without specifying new hosts.

If you use two hosts one for admin and one for user you can use specify this in site.ini:

[SiteAccessSettings]
MatchOrder=host;uri

HostMatchType=map
HostMatchMapItems[]=myadminhost.com;admin

[SiteSettings]
DefaultAccess=user

That way it will first try host matching and match the admin, if admin is not matched it will try url based using DefaultAccess if none is specified.
Then create one siteaccess per language for instance sp (spanish) and fr (french), you will then get url's like this:
/sp/content/view/full/2 and /fr/content/view/full/2.
It can also be a good idea to use a different siteaccess for the default site to avoid urls like /user/content/view/full/2.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Paulo Almeida

Thursday 27 March 2003 5:22:33 am

Well, first part os hostmap i understud (was what i posted before), but your idea of /en, /sp, /pt, etc sound very interesting, but i can't understand that (i never understud URIMatch :-( ). Can you give an example of that?

Thanks

Paulo Almeida

PACPI.COM Internet Consulting
http://pacpi.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 30 2025 22:21:25
Script start
Timing: Jan 30 2025 22:21:25
Module start 'layout'
Timing: Jan 30 2025 22:21:25
Module start 'content'
Timing: Jan 30 2025 22:21:25
Module end 'content'
Timing: Jan 30 2025 22:21:25
Script end

Main resources:

Total runtime0.0251 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.2578151.2266
Module start 'layout' 0.00610.0046 739.4844220.7344
Module start 'content' 0.01070.0130 960.21881,005.8359
Module end 'content' 0.02360.0014 1,966.054737.9922
Script end 0.0251  2,004.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002710.6289140.0002
Check MTime0.00104.1724140.0001
Mysql Total
Database connection0.00093.498710.0009
Mysqli_queries0.003312.995630.0011
Looping result0.00000.056010.0000
Template Total0.00104.110.0010
Template load0.00083.012810.0008
Template processing0.00031.082710.0003
Override
Cache load0.00052.014610.0005
General
dbfile0.00187.230880.0002
String conversion0.00000.043740.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