Forums / Setup & design / Translations problem with Croatian characters

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

eZ debug

Timing: Jan 19 2025 06:27:07
Script start
Timing: Jan 19 2025 06:27:07
Module start 'content'
Timing: Jan 19 2025 06:27:08
Module end 'content'
Timing: Jan 19 2025 06:27:08
Script end

Main resources:

Total runtime0.9729 sec
Peak memory usage4,096.0000 KB
Database Queries197

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0082 589.0859180.8125
Module start 'content' 0.00820.8267 769.8984573.0313
Module end 'content' 0.83500.1379 1,342.9297336.7422
Script end 0.9728  1,679.6719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4179210.0002
Check MTime0.00150.1512210.0001
Mysql Total
Database connection0.00120.119710.0012
Mysqli_queries0.891791.65841970.0045
Looping result0.00210.21941950.0000
Template Total0.943697.020.4718
Template load0.00180.184720.0009
Template processing0.941896.801620.4709
Template load and register function0.00010.007710.0001
states
state_id_array0.00100.105110.0010
state_identifier_array0.00140.138920.0007
Override
Cache load0.00150.1575440.0000
Sytem overhead
Fetch class attribute can translate value0.00160.159930.0005
Fetch class attribute name0.00100.106560.0002
XML
Image XML parsing0.00260.272330.0009
class_abstraction
Instantiating content class attribute0.00000.001780.0000
General
dbfile0.00570.5865350.0002
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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