Language INI maker


Version
0.8 (last update on Nov 2, 2008)
Rating
Compatibility
Votes
Favoured
18
License
GPLv2 or later
Non-Commercial
Type
Views
15534
Date Added
30 October 2008
Here is the process of creating a file in two steps. First, is parsing component and output to the page then saved to a file (after visual inspection).
Description of work:
* In the folder "components / ", or administrator / components / selected all the files depending on "Client" and "Component".
* In PHP files searched for key phrases for the transfer of a pattern "JText ::_(*)".
* In XML file searched for key phrases in the "params", "state", "layout", "message", "title", "label", "description".
* These key phrases are compared and, if necessary, combined with phrases already available in the INI file selected language.
* Results of the key phrases written in the INI-file. Old file renamed the with the extension "bak".
* All comments in the INI-files are remaining stable.
* There is the option to make excessive creation of the language file (that is, if the phrase is not found in source code, but it already exists in the old INI-file, it will be added to the new one).
Nice component! Does what is says it'll do in an easy way where you can see easily what you can/must do.
Good that it uses two steps:
1) show you both current and new INI file contents (after parsing)
2) if you want you can save the new INI file, and the 'old' one will be backed up
Other plus
- two files: one for front-end, one for backend
Only two tiny negatives:
- As Elovaris said, JText::sprintf() is not included.
- It seems to me that the menu items that can be translated in a en-GB.com_component.menu.ini are put in the GB.com_component.ini (or: I don't know how it is supposed to work...)
If I ever want to write another component, then I'd code it all with JText-es and deal with the language file later.
Good that it uses two steps:
1) show you both current and new INI file contents (after parsing)
2) if you want you can save the new INI file, and the 'old' one will be backed up
Other plus
- two files: one for front-end, one for backend
Only two tiny negatives:
- As Elovaris said, JText::sprintf() is not included.
- It seems to me that the menu items that can be translated in a en-GB.com_component.menu.ini are put in the GB.com_component.ini (or: I don't know how it is supposed to work...)
If I ever want to write another component, then I'd code it all with JText-es and deal with the language file later.
Owner's reply
Thanks
This extension is a must have for Joomla developers. You can concentrate on development and deal with language inis later. In fact, you don't deal with them anymore, the extension does!
After using it for a while now, I can say it's very reliable. Only con is that it does not include strings generated with JText::sprintf(). Most people include the placeholder in the text like this:
JText::sprintf('It would be %s very nice','very');
Apart from that, I think the extension is perfect!
After using it for a while now, I can say it's very reliable. Only con is that it does not include strings generated with JText::sprintf(). Most people include the placeholder in the text like this:
JText::sprintf('It would be %s very nice','very');
Apart from that, I think the extension is perfect!
This only does one thing but what a great tool. Every developer of joomla components needs this.
I had just decided to switch from my old system of defining all language snippets and moving to Joomla's native .ini system. I was looking forward to a night of copy/paste.
This saved me hours of time. Thanks so much.
I had just decided to switch from my old system of defining all language snippets and moving to Joomla's native .ini system. I was looking forward to a night of copy/paste.
This saved me hours of time. Thanks so much.





