B4J Code Snippet [ABMaterial] update translator

Hello.
I write a webapp in ABMaterial and create it in multiple languages. I encountered the problem that when I do new things or change the old one using the example 'page.XTR ("0003", "City") I have to add in a few language files a new item I added to the program.
It takes time and sometimes I was wrong.

I write a small program in B4J which automates this for me.
1. In the 'Folder tran ..' box, enter the name of the directory where the language files are located. By default, 'translations'.
2. Select 'Open' and find the main file of your application with extension 'b4j'
3. The program automatically downloads the name 'webapp', sets the paths, and checks for the language files.
4. Select 'Update'. The program will automatically add new values in the base language to the appropriate place in the language files. In added lines at the end will be added '<- NEW'
5. All the time in the log window we see changes.


img1.png img2.png img3.png img4.png


The program saves to the configuration file the last path of the webapp project. After rebooting, the file will load the path and prepare for update.
Sorry for my weak english.


New version of the program, v.2.
- Display all languages in the data table
- Editing data from the program level
- Save all data to language files.

Version 2.1
- Bug fixes for new lines

imgv2.png
 

Attachments

  • ABMtranslator v.1.02.jar
    358.3 KB · Views: 224
  • ABMTranslator2.1.jar
    370.8 KB · Views: 258
Last edited:

Cableguy

Expert
Licensed User
Longtime User
I like the approach...
May I make a "small" suggestion...
Create a new pane to show a table...
In the left most position show the string code, like "0003", next to it the default value, and then the translations... This would then turn your app into an translation editor.
 

MichalK73

Well-Known Member
Licensed User
Longtime User
I wrote it yesterday fast. This made my job easier.
@Cableguy
So he wants to do that there will be a table loaded with all languages in which you will be able to directly type a new translation or can from the vending machine.

Added new versions in first post.
- validation of character ';'
 
Top