Forums / Setup & design / Translations problem with Croatian characters

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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: Exponential did not finish its request

The execution of Exponential 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