Forums / Setup & design / New Language: Can't figure it out

New Language: Can't figure it out

Author Message

Maarten Holland

Wednesday 21 January 2004 1:45:52 pm

I'm trying to create a new Dutch translation for eZ Publish 3. Unfortunately I can't get it to work. Here's what I've done so far:

- I've installed QT's Linguist for Windows on my desktop machine.
- Downloaded share/translations/untranslated/translation.ts from my testserver.
- Translated it partially.
- Saved it (just 'save' from QT, should I do anything else?)
- Created a new folder in share/translations: 'dut-NL', chmodded it 777, just to be sure.
- Uploaded the new translation.ts to this folder.
- Downloaded eng-GB.ini form share/locale
- Edited it and uploaded it as share/locale/dut-NL.ini.
- Created the new language in the setupsection of my admininterface.
- Changed settings/override/siteaccess/mysite/site.ini.append:

Changed:

[ContentSettings]
TranslationList=

[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
TextTranslation=disabled

Into:

[ContentSettings]
TranslationList=

[RegionalSettings]
Locale=dut-NL
ContentObjectLocale=dut-NL
TextTranslation=enabled
TranslationCache=enabled

After this I get the following error when viewing my site:

Fatal error: Maximum execution time of 30 seconds exceeded in /path-to-ezpublish-root/lib/ezxml/classes/ezxml.php on line 271
Fatal error: eZ publish did not finish it's request

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

Here is the relevant snippet from ezxml.php:

268 // check for CDATA
269 $cdataSection = "";
270 $isCDATASection = false;
271 $cdataPos = strpos( $xmlDoc, "<![CDATA[", $pos );
272 if ( $cdataPos == $pos && $pos > 0)

Perhaps something is wrong with translation.ts? How can I validate it? I've had some errors while tranlating: 4 translations got a warning sign in front of it (red exclamation point), which I couldn't fix.

http://ez.no/developer/ez_publish_3/documentation/configuration/configuration/language_and_charset/creating_a_new_translation - This page tells me I need to execute 'bin/linux/ezlupdate -v dut-NL' but therefore I need to download, build and execute Trolltech's QT. Do I really need to do that or is that only necessary if I want to change/translate translation.ts on my server instead of my desktop machine?

Really hope anyone will help. Thank you for your time.

Cheers,

Maarten

Gunnstein Lye

Thursday 22 January 2004 7:58:46 am

You have done everything right as far as I can tell.

You get the PHP timeout because you don't have the mbstring extension enabled in PHP. Without it, eZ publish tries to do all charset related stuff by itself, which takes a lot more time. It would probably have worked, if your max PHP execution time was a bit longer. Enable mbstring, and you should have no problems.

The red warning sign in the linguist means that the formatting of your translated string does not match that of the english string. Probably a missing period (.) or something like that. There are buttons to control these warnings on the tool bar. (The file will be saved correctly even with these warnings.)

ezlupdate is necessary to update a translation.ts file when eZ publish templates have changed, or to create one if you don't have the untranslated .ts file. In your case, you don't need it. I'll update the doc.

Good luck!

Maarten Holland

Thursday 22 January 2004 11:05:39 am

Thank you for your reply. I saw you already updated the doc. Unfortunately I can't get mbstring to work, so I raised the max_execution_time to 300 sec. But now the pages load that slow, that it's not acceptable. Is it perhaps possible that you give some tips on configuring mbstring or post a sample of you php.ini?

Thanks in advance,

Maarten

Gunnstein Lye

Friday 23 January 2004 1:58:12 am

You don't need any settings for mbstring. As far as I know, mbstring must be enabled when compiling PHP, or try to get a precompiled PHP package with mbstring enabled. I have never compiled PHP myself, so I can't give any further advice. You could try to search the forums for 'mbstring'.