Local DB
What is it?
A Command Line tool to aid with software localization; specifically organization and translation. Subscribe to the mailing list to to be notified on future updates.
Why is it special?
It is all about the database! This tool builds, modifies, and exports from a SQLite database, which is just a file. Store it in your source control and query this DB from your other systems. Include this tool in your pipelines, automate away!
How much does it cost?
5$ with free updates forever. It is a single binary, store it, copy it, do whatever you want with it.
Examples
Let's get right to the examples. Below are the three things you can do with this tool: import, translate, and export.
Import to DB
Import from three formats: json, csv, and unity assets. Json and csv formats are specific to this tool but are dead simple to implement. Here is what the json format looks like:
[
{"key": "difficulty_easy", "data": "Easy", "language": "en"},
{"key": "difficulty_easy", "data": "簡単", "language": "ja"},
{"key": "difficulty_hard", "data": "Hard", "language": "en"},
{"key": "difficulty_hard", "data": "難しい", "language": "ja"}
]
And here is the command to import all translations in this file to the database 'mydb'.
lli_localdb import --file=locales.json --db=mydb
Translate in DB
Translate existing entries in the DB to other languages. Always best to use human translators if you can afford it, but this tool will get you started. Current translation providers: Google Translate and LibreTranslate. If you have a favorite API-Based Translation provider that is missing please let us know!
lli_localdb translate --source-lang=en --to=fr --provider=libretranslate --endpoint=http://localhost:5000
lli_localdb translate --source-lang=en --to=ja,es --provider=google-translate --env-file=.env
lli_localdb translate --source-lang=en --to=ja,es --provider=google-translate --api-key=123456
Export from DB
Export to json, csv, and unity asset formats.
lli_localdb export --db=mydb --file=export.csv
lli_localdb export --db=mydb --file=translations.json
lli_localdb export --db=mydb --file=StringTable.asset
lli_localdb export --db=mydb --file=locales.csv --lang=en,es,fr
Import/Export Formats
- CSV (1.0)
- JSON (1.0)
- Unity Asset (BETA)
- Have a preferred format? Let us know!
Translation Providers
- LibreTranslate - Free and Open Source Machine Translation
- Google Translate - Cloud API Machine Translation
- Have a preferred provider? Let us know!