Translations problem with Croatian characters

Author Message

Marko Žmak

Saturday 02 July 2005 9:37:08 am

I created a custom translation (cust-ENG), and created a translation.ts file for it. It works OK, but it gives an error when I try to use Croatian letters like: ¨đčć¸.

This is the error:

Fatal error: Call to a member function on a non-object in /home/sites/site505/web/lib/ezi18n/classes/eztstranslator.php on line 267
Fatal error: eZ publish did not finish its request

The execution of eZ publish was abruptly ended, the debug output is present below.

and this is the sample file that generates this error:

<!DOCTYPE TS><TS>
<context>
<name></name>
<message>
<source>Trenutno nema sadr¸aja.</source>
<translation type="unfinished">No content for now.</translation>
</message>
</context>
</TS>

Without the "¸" letter it works O.K.

How can I fix this?

I use iso-8859-2 encoding in my templates.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Daniel Beyer

Sunday 03 July 2005 8:49:50 am

Hi Marko,

which encoding do you use for your translation.ts? Try utf-8 for it. I put your code in my UTF-8 translation.ts and it worked just fine with the "¸".

BTW you should exchange the source- and the translation-tag:

<!DOCTYPE TS><TS>
<context>
<name></name>
<message>
<source>No content for now.</source>
<translation type="unfinished">Trenutno nema sadr¸aja.</translation>
</message>
</context>
</TS>

And don't forget to fill in the name-tag!

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

Marko Žmak

Friday 08 July 2005 6:30:03 am

My site is in iso-8859-2 (latin2). If I change encoding of translation.ts to utf-8 won't there be any conflicts?

Also did you try my translation without changing the source and translation? (by simply copy-paste my translation)

And I don't have to change source and translation because the principle is that the main site is in Croatian, and sites in other languages are translations from Croatian.

P.S. I filled the name tag. Result is the same.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Saturday 09 July 2005 9:06:57 am

I changed the ancoding of the transation.ts file to UTF-8 and works O.K. Except for one detail. When I put this message in the translation file:

<message>
<source>No&#263;enje / doru&#269;ak</source>
<translation type="unfinished">B&B</translation>
</message>

the same error occurs. When I omit the "&" character from the translation it works O.K.

Is this u bug?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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

Main resources:

Total runtime0.5788 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 590.4219152.6406
Module start 'layout' 0.00580.0037 743.062539.4766
Module start 'content' 0.00950.5677 782.5391567.9375
Module end 'content' 0.57730.0015 1,350.476612.1250
Script end 0.5787  1,362.6016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5885160.0002
Check MTime0.00130.2278160.0001
Mysql Total
Database connection0.00060.108510.0006
Mysqli_queries0.512088.4619600.0085
Looping result0.00080.1417580.0000
Template Total0.542393.720.2712
Template load0.00230.399820.0012
Template processing0.540093.295120.2700
Template load and register function0.00010.021410.0001
states
state_id_array0.00200.349510.0020
state_identifier_array0.00120.210620.0006
Override
Cache load0.00200.3403440.0000
Sytem overhead
Fetch class attribute can translate value0.00060.106820.0003
Fetch class attribute name0.00130.231760.0002
XML
Image XML parsing0.00280.489820.0014
class_abstraction
Instantiating content class attribute0.00000.003380.0000
General
dbfile0.00490.8409240.0002
String conversion0.00000.001840.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs