PHP standard in eZ: using single quotes in strings may cause problem with italian language

Author Message

Andrea Palladino

Saturday 20 November 2004 9:24:56 am

This sintax may cause problems with some languages (like italian):

$var = 'some text' ;

For example, the package function use a php code (compiled on cache) with:

$var = 'Seleziona un'icona da includere nel pacchetto.<br />
Se non vuoi alcuna icona clicca Successivo.' ;

The string "un'icona" is the correct italian translation for "an icon". Of course the apostrophe is interpreted as a closing quote by php. This will generate a fatal error.

<b>Possible solutions</b>
Change the italian messages with apostrophe (for example: un'icona may be una icona), but this will result on a bad italian...

More solutions?

Marco Zinn

Saturday 20 November 2004 2:51:30 pm

I suggest, that you file a bug report.
The translation system (or the template compiler) should be able to handle "all" characters. This should not be too hard, the apostrophe just needs to be escaped.
But this must be done somewhere in ezpublish's PHP code.

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

Andrea Palladino

Sunday 21 November 2004 1:41:02 am

I have opened a specifig bug report:

http://www.ez.no/community/bug_reports/php_standard_in_ez_using_single_quotes_in_strings_may_cause_problem_with_italian_language

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

Main resources:

Total runtime0.9219 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.4219152.6875
Module start 'layout' 0.00580.0033 741.109439.6172
Module start 'content' 0.00910.9114 780.7266534.4141
Module end 'content' 0.92050.0013 1,315.14068.0156
Script end 0.9218  1,323.1563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3525160.0002
Check MTime0.00130.1439160.0001
Mysql Total
Database connection0.00100.104910.0010
Mysqli_queries0.877195.1436570.0154
Looping result0.00050.0558550.0000
Template Total0.891396.720.4457
Template load0.00210.223020.0010
Template processing0.889396.461320.4446
Template load and register function0.00020.024510.0002
states
state_id_array0.00140.153210.0014
state_identifier_array0.00070.075820.0003
Override
Cache load0.00170.1842190.0001
Sytem overhead
Fetch class attribute can translate value0.00040.045420.0002
Fetch class attribute name0.00160.175640.0004
XML
Image XML parsing0.00060.063720.0003
class_abstraction
Instantiating content class attribute0.00000.001140.0000
General
dbfile0.00090.0992160.0001
String conversion0.00000.001040.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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: 16
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs