3 days with no solution

Author Message

Selmah Maxim

Monday 07 July 2003 2:05:54 am

Hi ..

my site will have multi language, user can submit his site data with different languages, and user can submit one per language ...

Now, the problem is how can I detect from template whit which language he had submitted his data?
I need to know this to prevent him to submit twice with the same language!

I know with '$:item.contentobject_version_object.language_list.0.language_code'
I can get the language code, but as you see the array is with 0,1,..etc, so i cann`t take this as constant for langauge code !

I had spend 3 days at this with no solution ... any help please ?!

thx

Bård Farstad

Monday 07 July 2003 2:08:58 am

You need to use the featutres in the content edit page. If you add two or more translations to an object you will see that you get a radiobox on the right hand side where you can select the translation. You need to use this code to specify the current translation.

--bård

Documentation: http://ez.no/doc

Selmah Maxim

Monday 07 July 2003 2:14:07 am

thx brad, but is there are any way to list from template with which language had sent ?

I mean, if user browesing site en/ then the template code should check if he have recored with english language ..

anther way, is there are any way to term in loop to select the language code ?

Selmah Maxim

Monday 07 July 2003 2:17:52 am

The idea that there is user menu, if user didn`t send yet his info with en/ language will get 'New Data' link , else will get 'Edit' , in case new and he click this button he will go to categories listing module (I made it) , so in this case there is no edit option .. coz he must select category then after that he go to edit page !

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 31 2025 01:36:27
Script start
Timing: Jan 31 2025 01:36:27
Module start 'layout'
Timing: Jan 31 2025 01:36:27
Module start 'content'
Timing: Jan 31 2025 01:36:27
Module end 'content'
Timing: Jan 31 2025 01:36:27
Script end

Main resources:

Total runtime0.0249 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.1250151.2109
Module start 'layout' 0.00550.0047 739.3359220.6875
Module start 'content' 0.01020.0129 960.0234997.7891
Module end 'content' 0.02310.0017 1,957.812533.9922
Script end 0.0248  1,991.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003011.9621140.0002
Check MTime0.00124.8299140.0001
Mysql Total
Database connection0.00083.130210.0008
Mysqli_queries0.002711.011730.0009
Looping result0.00000.064210.0000
Template Total0.00124.710.0012
Template load0.00093.745310.0009
Template processing0.00020.961010.0002
Override
Cache load0.00062.475810.0006
General
dbfile0.00031.196780.0000
String conversion0.00000.045040.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