Like taking your first head-first dive into a swimming pool, or riding a bicycle without training wheels, editing a language define file can seem daunting.
But it is actually very simple, and (if you follow some simple backup rules) you can't damage anything.
The first thing you need to do is use a proper FTP program. A FTP program is just a way of establishing a connection between your remote server (where your website lives), and your home computer. FTP means "File Transfer Protocol", so FTP allows you to move files from your server to your machine at home, and to move them the other way too.
In the same way that you can shift files around on your home computer, so too can you shift files from ANOTHER computer to your home machine.
If you use word processing on your home computer (MS Word), when you type up a document and SAVE it, you are using an "internal" FTP system, because when you save that doc, you are prompted to put it somewhere... You will choose an appropriate folder, and save your document to that folder. Later, if you want to open that doc, you just "navigate" to the folder where it is saved, and you open it.
If you can do that, you can also use FTP. The principle is the same.
The key is to know WHERE to save files (just like with MS Word).
In Zencart, the LANGUAGE files are all in a folder called "languages", which is quite sensible, don't you think?
So, you need to NAVIGATE to that folder on your server, and then FIND the file(s) that need editing, and then transfer a copy of the file to your home computer (using FTP).
When you have a copy on your home machine, you can safely make edits to it as it's just a copy. The original remains on the server, and functions just as it did before.
When you have edited the copy, and want to send it back to the server, you need to "safeguard" the original file, so that if the edited copy has mistakes, you can delete it, and "restore" the original. And we ALL make mistakes when editing, so we ALL do what's necessary to "safeguard" the original.
When you are ready to send the file back to the server, it must occupy the same location you took it from, if you are editing the over-ride version. Things are a bit different if you have no over-ride version - in which case your edited copy BECOMES the over-ride version.
There is a LOT of information and tutorials that explain the over-ride principle, so I won't go into that here. You should learn a bit about over-rides and CUSTOM files before you edit CORE files.
In any event, if you have to send the file to a location where it REPLACES the original file, all you do is RE-NAME the original file on the server from xxxxxx.php to xxxxxx.bak
When you load your edited file, it assumes the functions of the original (now disabled because of the different filename extension - bak).
If your site fails to work after your edit, then it's just a case of DELETING your edited copy off the server, and RE-NAMING xxxxxx.bak to xxxxxx.php
Assuming you now know how the over-ride system works, you will now boldly go ahead with your edits.
To edit PHP files safely, you need what is known as a PLAIN TEXT EDITOR. This is simply a program that does not "format" the text you are editing. MSWord for example, will automatically "format" text when you use that program. It will apply styles to the font, for example. when editing computer code, you cannot have the editor do any of this stuff. PHP is plain text, and must stay that way.
We use a neat little code editor called CRIMSON EDITOR which is free software. There are others, such as notepad++. See that I say notepad++ ... NOT notepad. The "notepad" that is probably in your home computer is not sufficiently "plain", so you shouldn't use that.
SO... now you have an understanding of:
1. FTP
2. PLAIN TEXT EDITING
3. THE NEED TO SAFEGUARD ORIGINALS
4. THE OVERRIDE SYSTEM
In almost ALL cases, editing a language define involves making changes to an appropriate line of PHP that looks like this:
define('TEXT_GV_NAME','Gift Certificate');
Let's look at how this would appear when we open it in CRIMSON EDITOR:
PHP Code:
define('TEXT_GV_NAME','Gift Certificate');
Here's the edit you will make:
define('TEXT_GV_NAME','Sabbykash');
And in CRIMSON EDITOR it will look like this:
PHP Code:
define('TEXT_GV_NAME','Sabbykash');
Now, just follow the tutorials that Steve pointed you to, and go ahead and try your edits...
Bookmarks