Author Topic: Translation Problem 2  (Read 2361 times)

Offline renta

  • User
  • *
  • Posts: 5
    • View Profile
Translation Problem 2
« on: September 16, 2009, 12:19:49 PM »
First of all.. my compliments for Knowledgeroot.. great script and we use it as a knowledgebase in our company.

I couldn't reply to the first Translation Problem topic started by MHolkamp , so i started a new topic because i have the same translation problem (Dutch language).
I also upgraded from 0.8.6 ->  0.9.9.3 and the dutch translation didn't work as a guest. When i logged in and set the language for my account, the translation did work.
When i choose the language dropdown menu on the front page and (as a guest) i changed the language the translation did work.
After some time i realised that in the admin configuration menu i had to change 'set default language' from 'nl' to 'nl_NL.UTF8' and then the translation did work as a guest.
I think that is not very clear that nl_NL.UTF8 has to be used, perhaps a tip to change this?

Furthermore i experienced problems upgrading. After upgrading i got a gettext error and a white page on the front end. After some google search i found out that i had to install php with the 'multibyte string' extension. i don't know if the 'gettext' extension is also needed. In the previous version only the mysql extension was neccesary.
I use knowledgeroot with IIS, php 5.2.4 as as a cgi. Perhaps a tip for other IIS users.

I also found out that de skin selection for the fckeditor doesn't work. When i choose office2003 skin or toolbar, it always shows the default skin and toolbar. When i view the source while editng content you can see the default skin is always used:
Code: [Select]
<input type="hidden" id="content___Config" value="SkinPath=skins/default/&amp;CustomConfigurationsPath=/extension/fckeditor/fckconfig.js&amp;AutoDetectLanguage=true&amp;DefaultLanguage=en" style="display:none" /><iframe id="content___Frame" src="./extension/fckeditor/fckeditor/editor/fckeditor.html?InstanceName=content&amp;Toolbar=Default" width="600" height="450" frameborder="0" scrolling="no"></iframe>
Only when i copy the office2003 skin in the default skin, the office2003 skin is shown.

I hope this is some use to you.


Offline renta

  • User
  • *
  • Posts: 5
    • View Profile
Re: Translation Problem 2
« Reply #1 on: September 16, 2009, 02:39:25 PM »
Just a little remark, i couldn't edit my post anymore. I noticed that the highlighting problem in version 0.9.9.3 within html code wasn't solved, but that the adjustments were made from an earlier topic.
After changing line 1084 in class-knowledgeroot-content.php to

$row['content'] = $this->CLASS['highlight']->str_highlight($row['content'], $hvalue, $this->CLASS['highlight']->STR_HIGHLIGHT_STRIPLINKS, '<span class="highlightword">\1</span>');

so changing STR_HIGHLIGHT_SIMPLE in STR_HIGHLIGHT_STRIPLINKS

the highlighting works fine. Is it ok to solve that problem like this?

Offline admin

  • Administrator
  • User
  • *****
  • Posts: 553
    • View Profile
    • http://www.lordlamer.de
Re: Translation Problem 2
« Reply #2 on: September 16, 2009, 10:03:31 PM »
Hi,

1. i will check the highlighting stuff.
2. Did the problems with the language change exists? nl_NL.UTF-8 is the right value.
3. Gettext should also work without gettext installation. Hrm. For the multibyte string extension i need to check the source.

regards,
Frank

Offline renta

  • User
  • *
  • Posts: 5
    • View Profile
Re: Translation Problem 2
« Reply #3 on: September 17, 2009, 05:57:22 AM »
after changing 'set default language' from 'nl' to 'nl_NL.UTF8' the translation was allright. In the previous versions however you had to set the language to 'nl', so it was not really clear at first that 'nl_NL.UTF8'  had to be used. But it is not a problem now.

thanks for checking!




Offline renta

  • User
  • *
  • Posts: 5
    • View Profile
Re: Translation Problem 2
« Reply #4 on: September 17, 2009, 07:34:07 AM »
I tried to reproduce the error without the multibyte string extension, but i only get 'page not found' and internal server error.

I think it was an error with mb_detect_encoding in gettext.inc.php

Offline admin

  • Administrator
  • User
  • *****
  • Posts: 553
    • View Profile
    • http://www.lordlamer.de
Re: Translation Problem 2
« Reply #5 on: September 20, 2009, 09:27:43 PM »
Hi,

1. you need multibyte support for the gettext solution.
2. I fixed the highlight stuff.

The official next release will be available in the next days.

Frank

Offline Carl.Sephiroth

  • User
  • *
  • Posts: 1
    • View Profile
Re: Translation Problem 2
« Reply #6 on: September 28, 2009, 03:40:06 AM »
I change the highlight stuff with:

Code: [Select]
foreach ($highlight as $hkey => $hvalue) {
  $row['content'] = str_replace($hvalue,'<span class="highlightword">'.$hvalue.'</span>',$hvalue);
}

and it works fine with multibyte charsets.

Offline admin

  • Administrator
  • User
  • *****
  • Posts: 553
    • View Profile
    • http://www.lordlamer.de
Re: Translation Problem 2
« Reply #7 on: September 28, 2009, 03:38:46 PM »
Hi,

so does the solution in version 0.9.9.4 not work for you?

If it does not work it would be fine if i can get some information from you so that i could solve the problem.

regards,
Frank

Offline renta

  • User
  • *
  • Posts: 5
    • View Profile
Re: Translation Problem 2
« Reply #8 on: September 30, 2009, 11:46:19 AM »
I can't upgrade tot 0.9.9.4 now, but i let you know if i have problems when i can.

Thanks

Offline admin

  • Administrator
  • User
  • *****
  • Posts: 553
    • View Profile
    • http://www.lordlamer.de
Re: Translation Problem 2
« Reply #9 on: September 30, 2009, 08:32:57 PM »
Hi,

ok i will wait for your feedback.

Frank