Localizer - translate your apps easily - v0.6 (Lin/Mac/Win)
Posted: Fri Jun 15, 2007 3:52 pm
Hope, this is usefull for someone else. With this little tool you can replace nearly all strings used in your app with a variable and you'll get a file with all these replaced strings....
All your original files are left untouched(!) and you'll find, besides the file baselanguage.catalog, all altered files with a leading loc_...
simply choose the main source file... all used includes are searched and, if you have already a var which contains translations (i.E. the Language$ used by the VD of PB) it is searched too and the already used strings are added to the file.
REMARK: the datasection must have the label BaseLanguage
What's not working:
gtk-commands are not supported yet.. but maybe they'll work right out of the box (not tested yet)
you cannot exclude included files from translation (will be added) DONE
double entries are not eliminated (will be added)
no datasection is created.... (will be added... maybe)
commands within a command could cause a problem...
What you have to do:
if you already have a language var... comment all lines referring to this var and comment out the existing datasection as this one isn't needed any more
you have to read the languagefile (a routine is written in the main source at the top of the file)
if you want to run the altered files (leading loc_) you have to change the lines with the includes (i.e includefile "common.pb" to includefile "loc_common.pb") maybe I'll add this in a next version
translate the strings in another language
you can add or remove PB-Commands to be searched in the file commands.txt
if you use it for your apps, a credit somewhere in your app would be appreciated.. but is not a must
extract all files in a directory of your choice and start the app
choose a sourcefile (your main source)
if you have a variable already in use type in the name and check the checkbox
press Localize IT
An application with approx 25000 lines of code will be processed in approx 1-3 seconds .....
a screenshot:

Download LInux-Version: http://home.arcor.de/x-linux/pure/localizer_lin.zip (~44kb)
Download Mac-Version: http://home.arcor.de/x-linux/pure/localizer_mac.zip (~56 kb)
Download Windows-Version: http://home.arcor.de/x-linux/pure/localizer_win.zip (~31kb)
The Mac-Version is maintained by michel51...
Error-reports, questions as well as other feedback is always welcome
enjoy
Update to 0.2:
- fixed a bug which prevets the app from running correctly when started from the gui (linux)
- fixed an issue if a variable is alredy used (sometimes not all used vars were found)
- added: now you can select the includefiles to be searched (be carefull with deselecting an include and you already use a variable...)
- added: the prefix "loc_" is now added to all sourcefiles (includes) which are used (i.e. Xinclude "common.pb" to Xinclude "loc_common.pb"
Update to 0.3:
- fixed: window size of include file chooser is now dynamical (michel51)
- added: About/Help
- added: Preferences
- updated: code is now 100% cross-plattform (Lin, Mac, Win)
- fixed: all temporary files are now created in users temp-directory
- fixed: handling of PB-commands improved
- fixed: some minoe bugs
- updated: GUI (same GUI on all 3 OS)
Updated to 0.6 (Windows only!; Linux and eventually Mac will follow)
Changed: code to search PB-Commands reworked (much smaller and faster)
Changed: the help is a bit more detailed now
Removed: check for double entries .. must be totally rewritten
Fixed : some minor bugs
NOT WORKING: changing the language (next version)
Download Windows-Version(0.6): http://home.arcor.de/x-linux/pure/localizer.zip (~24kb)

simply choose the main source file... all used includes are searched and, if you have already a var which contains translations (i.E. the Language$ used by the VD of PB) it is searched too and the already used strings are added to the file.
REMARK: the datasection must have the label BaseLanguage
What's not working:
gtk-commands are not supported yet.. but maybe they'll work right out of the box (not tested yet)
you cannot exclude included files from translation (will be added) DONE
double entries are not eliminated (will be added)
no datasection is created.... (will be added... maybe)
commands within a command could cause a problem...
What you have to do:
if you already have a language var... comment all lines referring to this var and comment out the existing datasection as this one isn't needed any more
you have to read the languagefile (a routine is written in the main source at the top of the file)
if you want to run the altered files (leading loc_) you have to change the lines with the includes (i.e includefile "common.pb" to includefile "loc_common.pb") maybe I'll add this in a next version
translate the strings in another language

you can add or remove PB-Commands to be searched in the file commands.txt
if you use it for your apps, a credit somewhere in your app would be appreciated.. but is not a must
extract all files in a directory of your choice and start the app
choose a sourcefile (your main source)
if you have a variable already in use type in the name and check the checkbox
press Localize IT
An application with approx 25000 lines of code will be processed in approx 1-3 seconds .....
a screenshot:

Download LInux-Version: http://home.arcor.de/x-linux/pure/localizer_lin.zip (~44kb)
Download Mac-Version: http://home.arcor.de/x-linux/pure/localizer_mac.zip (~56 kb)
Download Windows-Version: http://home.arcor.de/x-linux/pure/localizer_win.zip (~31kb)
The Mac-Version is maintained by michel51...
Error-reports, questions as well as other feedback is always welcome

enjoy
Update to 0.2:
- fixed a bug which prevets the app from running correctly when started from the gui (linux)
- fixed an issue if a variable is alredy used (sometimes not all used vars were found)
- added: now you can select the includefiles to be searched (be carefull with deselecting an include and you already use a variable...)
- added: the prefix "loc_" is now added to all sourcefiles (includes) which are used (i.e. Xinclude "common.pb" to Xinclude "loc_common.pb"
Update to 0.3:
- fixed: window size of include file chooser is now dynamical (michel51)
- added: About/Help
- added: Preferences
- updated: code is now 100% cross-plattform (Lin, Mac, Win)
- fixed: all temporary files are now created in users temp-directory
- fixed: handling of PB-commands improved
- fixed: some minoe bugs
- updated: GUI (same GUI on all 3 OS)
Updated to 0.6 (Windows only!; Linux and eventually Mac will follow)
Changed: code to search PB-Commands reworked (much smaller and faster)
Changed: the help is a bit more detailed now
Removed: check for double entries .. must be totally rewritten
Fixed : some minor bugs
NOT WORKING: changing the language (next version)
Download Windows-Version(0.6): http://home.arcor.de/x-linux/pure/localizer.zip (~24kb)