Share My Creation B4JLocalizatorBuilder

I want to share this little app; when @Erel first post the B4XLocalizator Tutorial, one thing that I didn't like is that the Sqlite DB building was based on an external application (Excel)

This app recreates a similar environment of a Excel File in a B4J Tableview:

upload_2016-9-29_12-8-10.png


---------------------------
With this util, you can:
  • Insert key (base language i/s English but can be modified changing a global constant in code)
  • Delete a key
  • Insert language to translate (new column)
  • Delete language (column)
  • Save Tableview as CSV ("/" as separator but can be modified in code easily)
  • Load CSV in tableview (when closing Form, a backup CSV is saved): there's an example CSV on zip
  • Translate keys to selected language: it uses Google translate API (in it's free form so no API key is needed but I don't know exactly if it can work forever)
  • Build the SQlite DB in "Localizator format" -> key, lang,value
Hope it can be useful for someone ! Any reply will be welcomed ..

Edit: Attached version 1.2 -- 9/10/2016

ChangeLog:
1.2
-Translate keys to all languages in one pass to tableview (Check option on UI)
-Cleaned and optimized code (almost on FillTableview with translated keys)
1.1
- Settings Panel added to select:
- Key language
- Path and name of SQlite DB
- Option to load a CSV file/SQlite DB
-Bug fixes
--------------------------
1.0
- Insert key / Delete a key
- Insert language to translate / Delete language
- Load / Save Tableview as CSV ("/" as separator)
- Translate keys to selected language: it uses Google translate API
- Build the SQlite DB in "Localizator format" -> key, lang,value
 

Attachments

  • B4JLocalizatorBuilder1_2.zip
    24.4 KB · Views: 367
Last edited:

Cableguy

Expert
Licensed User
Longtime User
Small notes:

1 - when 'en' is added as language, and a key is tried to translate to English ('en'), the translation fails...

2 - the key content may not be the actual phrase that we want to translate, so a 'base' language should be set, usually English.

3 - a 'all' option should be added to the languages combo in order to allow translation into all the added languages. Also a way to deselect one language keeping all the others selected.

4 - when creating the database, should be prompted (and then remembered) for the folder where to save it.

5 - I would also like a reverse database method available, so that we could take an existing database and add an extra language to it.

All and all, it's a very good starting point for this tool
 

inakigarm

Well-Known Member
Licensed User
Longtime User
Thanks @Cableguy, the answers to your replies

Small notes:

1 - when 'en' is added as language, and a key is tried to translate to English ('en'), the translation fails...

Not failing really: the base language (key language column is english) so I've coded this message; I've changed to "Base language is the same as translated language"

2 - the key content may not be the actual phrase that we want to translate, so a 'base' language should be set, usually English.
The actual base language is english; I will add a combo that selects which is the base language

3 - a 'all' option should be added to the languages combo in order to allow translation into all the added languages. Also a way to deselect one language keeping all the others selected.
Sure, this is an option I want to include in v1.0 but I've to change the code flow and I preferred to upload first version before

4 - when creating the database, should be prompted (and then remembered) for the folder where to save it.

Yes, will create Settings to save the default path

5 - I would also like a reverse database method available, so that we could take an existing database and add an extra language to it.

Yes, as in 3, that's an option I want to include but not in version 1.0

All and all, it's a very good starting point for this tool[/QUOTE]

Version 1.1 will include questions 1,2,4,5 ---> when I've time, version 1.2 will include question 3
 

Cableguy

Expert
Licensed User
Longtime User
Nice to see new features added.... I will give it another spin
 
Top