Forums / All Other Contributions/Addons / Ckeditor English works, other lang. blank

Ckeditor English works, other lang. blank

Locked

Views: 1,273

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
15 Jun 2012, 12:11 AM
#1
rxlv avatar

rxlv

New Zenner

Join Date:
Jun 2012
Posts:
2
Plugin Contributions:
0

Ckeditor English works, other lang. blank

Hi!

tldr: ckeditor works at Catalogue/"Categories and products" only with English product description not descriptions in other languages (allocated space for ckeditor is just blank)

I installed zencart using the how-to on zencart page. Then I made a copy of english folder and .php in admin/includes/languages/ and the same @ includes/languages/ and made admin/includes/languages/latvian and .php and @ includes/languages/latvian and .php
Basically I checked out available language pack .zip files folder tree and how-to's and instead of copying new files in duplicated english and renamed them to latvian.
Added additional language in admin interface and made it default
Then I started translating .php by .php for the shop (just includes/languages/latvian) I have no plan on translating admin section. Though the admin section has a drop down menu for languages too. (Shop has buttons with flags)
Everything was working well and as I thought it should.
So I installed CKeditor from zencart page plugin section. I used the included how-to and it worked but only if I use English as my admin page language. It wouldn't be problematic but when I add new products to catalogue there is a blank section for my language where the ckeditor windows should be and then there is the English product description section where the editor shows up and works.
So how do I add a new (duplicate of English) language to ckeditor so it works in adding new products(Catalogue /"Categories and products") and possibly Tools/"Define pages editor" otherwise the ckeditor window is just blank
I susspect the problem is in
admin/includes/ckeditor.php
cause it has

$var = zen_get_languages();
$jsLanguageLookupArray = "var lang = new Array;\n";
foreach ($var as $key)

or some other section (check the whole file from the .zip at download plugin section http://www.zen-cart.com/downloads.php?do=file&id=1098)
I also copied editors/ckeditor/lang/en.js to lv.js That didn't work
I also checked localization/Language Code: lv it fits the editors/ckeditor/lang/_languages.js definitions
Double checked file permissions they are the same as for English folders.
I guess its all in the javascript code inside the admin/includes/ckeditor.php which I dont understand
Thanks in advance :)

15 Jun 2012, 12:17 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Ckeditor English works, other lang. blank

If you read the readme documentation in the ckeditor plugin zip, you'll see that it tells you that you'll need to manually install the appropriate language files for CKEditor by downloading them from the CKEditor website. They were removed from the Zen Cart plugin packaging simply for brevity.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Jun 2012, 12:41 AM
#3
rxlv avatar

rxlv

New Zenner

Join Date:
Jun 2012
Posts:
2
Plugin Contributions:
0

Re: Ckeditor English works, other lang. blank

Thanks that did the trick!
I can't possibly imagine why that worked but it did :) I guess i should compare the files but considering that there will be so many diffs cause of the languages I'm just too laizy for that :D
Before that I had the lv.js file and I even changed the CKEDITOR.lang.en to CKEDITOR.lang.lv at the start of that file, but still didn't matter. But hey, that was an easy fix.
How do I close the thread?