#1 2010-08-29 19:19:59

gmathiou
Member
From: Crete, Greece
Registered: 2010-08-06
Posts: 12
Website

Error on modyfing the code of existing language

Hi again,

I noticed that when i tried to modify the code (i.e. gr) of an existing language to something else (i.e. el) the system was unable to do this. Well, it seemed that it did but it didn't.  In addition a new language folder (/mytheme/language)  was created with the new code and the one with the  previous code remained. On the website I get this php error:

Message: array_merge() [function.array-merge]: Argument #1 is not an array
Filename: libraries/MY_Controller.php
Line Number: 297

I guess that deleting the old folder will do the job. Although I believe that the static translations should be in the database as well, keeping the ftp problems with owners and priviledges away.

Thanks...

Offline

#2 2010-08-29 23:06:47

Michel-Ange
Ionize Core Team
From: Paris, France
Registered: 2010-03-22
Posts: 713
Website

Re: Error on modyfing the code of existing language

You can modify the lang code through the system, but of course the translation files must be available in your theme language folder.

If I understood well, what you do was :
1 Change the lang code of the language in the Admin panel,
2 Create the corresponding language folder and files

?


Inspiration & Innovation : Websites by Partikule, Agence Web Paris

Offline

#3 2010-08-30 02:44:50

gmathiou
Member
From: Crete, Greece
Registered: 2010-08-06
Posts: 12
Website

Re: Error on modyfing the code of existing language

I changed the lang code of the language in the Admin panel. The system itself created a new language folder with the new lang code and the lang files inside. Although, the folder with the previous lang code was remained (not deleted).

Now none of the two versions of the lang actualy works. The articles display correctly but the static translations don't.

Also I get this php error I said in my previous post, on the page. 

P.S. I tried the same thing localy on Wamp and it worked ok, so I imagine that something is going wrong with ftp or my instalation is messed up. However, I would like to see the static translations in database too.

Offline

#4 2010-08-30 12:03:39

Guardian
Ion Tester
From: Mragowo, Poland
Registered: 2010-08-02
Posts: 133
Website

Re: Error on modyfing the code of existing language

If you got to Content -> Language and the page opens for the static translations, are the static translations there correct?
If not, you can CHMOD your language files to 777 and then when you change your static translations, they will be updated in the language files for each language (as appropriate).

I had a similar problem with this myself as I use NetBeans IDE and the project is set to update the server via ftp and it took me a while to realise when I manually changed the language files locally and the changes were FTP'd, it reset the file permissions on the server which stopped the administration area's static language translations from working.

Offline

#5 2010-08-30 15:54:16

gmathiou
Member
From: Crete, Greece
Registered: 2010-08-06
Posts: 12
Website

Re: Error on modyfing the code of existing language

I already did the change to CHMOD but it didn't work. Actualy I can see that the system writes the language files perfectly but it cannot read them.

Considering the php error I get I imagine that something is going wrong with the ftp and the MY_Controler.php file.

I will probably re-install the system because now I can't add any other languages.

Offline

#6 2010-08-30 17:32:41

Guardian
Ion Tester
From: Mragowo, Poland
Registered: 2010-08-02
Posts: 133
Website

Re: Error on modyfing the code of existing language

Use your ftp program to see what 'group' the language files have set. It's possible that since the were created by Ionize, the files might be owned by 99/99 but you'll soon find out if you try to delete the files, you won't be able to.

Offline

#7 2010-08-30 17:45:02

gmathiou
Member
From: Crete, Greece
Registered: 2010-08-06
Posts: 12
Website

Re: Error on modyfing the code of existing language

Yes I know, the files are owned by "nobody" 99/99. It took me an afternoon, a few days ago, to find out why I can't delete any files. I think I hate ftp since then.
I overcomed this problem by deleting any file I want with a php script, I uploaded it in the files folder and it just did the job. 

However I can't still find any fix to my problem. I think I will try the next days to put the static translations on the db.

Offline

#8 2010-08-30 18:04:34

Guardian
Ion Tester
From: Mragowo, Poland
Registered: 2010-08-02
Posts: 133
Website

Re: Error on modyfing the code of existing language

No, delete your language files and your directory using your script, then re-create them manually by creating a new directory and copy/pasting the English language files into your new directory, then edit them manually - that is what I did.
In fact if you create the language directory and files manually and then chmod them 777 the admin static translation functions should then work for you.
I actually added Slovak language to the admin side and the user side like this and the user static translations are working fine for me.

Offline

What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel , Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.

Resources

Website : www.ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Translations on GitHub