For those of you who have been implementing the Breadcrumb Links using Masino Extensions, then you have to insert the additional Breadcrumb phrases into the XML Language files. This files are located under the languages sub-folder of PHPMaker installation. Most of the time, each of your PHPMaker project uses the different Breadcrumb phrases. Thus, if you always use the same XML Language file for all of your projects, then you need to backup each XML Language file in the different folder. The reason for this, since the XML Language file name is the same for all projects, and you don't want to replace the XML language that belongs to the old project with the current project. Each time you want to use the right XML Language file, then you have to copy them into the languages sub-folder. Believe me, even this issue looks not too serious, but this condition is not good and also annoying for you!
Today I just found out the solution to solve this issue, and honestly, I have been waiting to try to implement it for a long time ago. And Thank God, today I successfully implemented it. All we have to do is to separate and maintain the XML Language files in the different file name and to distinguish the name attribute that belongs to ew-language in the XML Language files. This change will now cause you can simply put all the XML Language files in the same folder. No worry about the clashing of XML Language files anymore. In other words, you don't need to separate the XML Language files to the different folder anymore. You don't need also to copy the right files to languages sub-folder before working in your PHPMaker project. This will save a lot of your time and also will enable you to select the right XML Language files from Tools -> Languages of PHPMaker.
Now I will show you the example of usage how to implement it step-by-step, to make it easier for you to understand the solution above.
Let's say when we have just installed PHPMaker for the very first time, we already have english.xml file, right? We can see in the second line from the top of that XML file contains the following code:
<ew-language date="2013/08/02" version="10.0.1" id="en" name="English" desc="English" author="e.World Technology Ltd.">
Now let's say also you want to translate it into your native language other than English. For example, I want to create the translation of that file into Indonesian, then I will save that file above as indonesian.xml and then change the code above become:
<ew-language date="2014/04/12" version="10.0.5" id="id" name="Indonesian" desc="Indonesian" author="Masino Sinaga">
Until this step, let's make sure those both languages have been listed and displayed correctly from PHPMaker. Simply click on Tools -> Languages from PHPMaker application, then you should see now there are two languages available in there as follows:
- Now let's make a deal by leaving the original XML Language files above as it is. They will be useful whenever we want to use the original XML Language files before adding the additional phrases, okay?
- The next step, let's say now, you want to create another XML Language files for your certain new PHPMaker project named demo10. To do this, we will create another two XML Language files based on those two original XML Language files above.
In order to distinguish the existing XML English Language, we will open the english.xml file, save it as english_demo10.xml and don't forget to change the code in the root node become:
<ew-language date="2014/04/12" version="10.0.5" id="en" name="English Demo 10" desc="English" author="Masino Sinaga">
The same way also to distinguish the existing XML Indonesian Language, we will open the indonesian.xml file, save it as indonesian_demo10.xml and don't forget to change the code in the root node become:
<ew-language date="2014/04/12" version="10.0.5" id="id" name="Indonesian Demo 10" desc="Indonesian" author="Masino Sinaga">
Until this step, now let's check them from PHPMaker. Click on Tools -> Languages menu, then you should see now there are four XML Language files available:
- English Demo 10
- Indonesian Demo 10
- As you can see now, you may select the related XML Language files only for the current PHPMaker project that you are working on it. For example, now you are working on demo10 project, then you should include the XML Language files by selecting English Demo 10 and Indonesian Demo 10 from Tools -> Languages.
That's it! Now you may try this solution for all of your PHPMaker projects. So, have a nice try, everyone! 🙂