Database
Database localization for application content.
Translate the text your application keeps in database tables, through ODBC, reuse earlier translations, check placeholders, and write the translations back into language columns or language rows. Your application keeps the schema and the queries.
- Input
- Tables through an ODBC connection: key columns and text columns
- Output
- Translations written back into language columns or language rows
- Runtime
- Your queries read the column or the rows of the user's language
- Edition
- Enterprise
On this page
Tutorial
Localize database content with Lingobit, step by step.
Four steps from the English column to translated columns or rows.
Lingobit reads the tables, translates in the project, and writes back.
You tell Lingobit which tables hold user-facing text, which columns are the key, and how translations are stored. It reads the English values into the project, where they are translated and checked. Create Localized Files writes the translations into the language columns, or into the language rows, of the same tables.
Lingobit does
- Reads the text columns of the tables you choose, with an optional rows filter.
- Reuses earlier translations and the translation memory.
- Checks placeholders, empty and too long translations, and more.
- Writes the translations with UPDATE, and adds missing language rows with INSERT.
Your application keeps
- The schema: the language columns, or the language-ID column.
- The queries that read the user's language.
- Which database Lingobit connects to: a copy or a staging database.
- The final test in the running application.
Reference
Your queries read the user's language.
Lingobit only fills the language columns or rows; the application chooses which one to show. Fall back to English in the query, so a value that is not translated yet still shows text.
Languages in columns
SELECT ID, COALESCE(de, en) AS Title
FROM STRINGS
Languages in rows
SELECT s.ID, COALESCE(t.Text, s.Text) AS Title
FROM STRINGS s
LEFT JOIN STRINGS t ON t.ID = s.ID AND t.Lang = 'de'
WHERE s.Lang = 'en'
Table settings.
Each table in the project has its own settings, under the names Add Database shows.
| Setting | What it does | Example |
|---|---|---|
| Connection string | How Lingobit reaches the database through ODBC; a registered data source also works | DSN=Shop |
| Unique key columns | Identify each row; translations are matched by them on every scan. A key column can also group rows into folders | ID |
| Rows filter | A SQL WHERE expression that limits the rows Lingobit reads | Localizable = YES |
| Target column name template | Same row another column: the name of each language column, by template or per language | de, or Title_de set per language |
| Language-ID column and value template | Same column another row: the column that names the language and the value for each language | Lang with a numeric language ID by default, or de set per language |
| Enable SQL monitoring | Lists each SELECT, UPDATE, and INSERT in Output | — |
Do and don't.
Do
- Connect Lingobit to a copy or a staging database, and move the translations on with your release.
- Create the language columns before Create Localized Files: Lingobit writes into them, it does not add them.
- Keep key values stable between releases.
- Use a rows filter to leave out technical rows.
- Set a maximum length for values that must fit a column or a screen.
Don't
- Point Lingobit at the production database.
- Edit translated values in the database by hand: the next Create overwrites them.
- Include IDs, codes, or settings in the columns to localize.
- Give translators access to the database: they work in Lingobit.
Troubleshooting.
| Symptom | Likely cause | What to do |
|---|---|---|
| Lingobit cannot connect | The ODBC driver for your database is missing for the platform Lingobit uses, or the connection string is wrong | Install the ODBC driver, test the connection string in the ODBC Data Sources tool, and try again |
| Create Localized Files reports an error for a table | A language column does not exist, or the key columns do not identify one row | Add the column, check the unique key columns, and turn on SQL monitoring to see the statement |
| The application still shows English | The query reads the English column or row, or the translations went to another database | Check the query and the connection string of the project |
| Technical rows appear in the project | The table has rows that are not user-facing text | Add a rows filter, such as Localizable = YES |
| German text is cut off in the application | There is no preview of database text, so long text shows only in the running application | Set a maximum length for the values in Lingobit; Validation reports translations that exceed it |
The database sample.
Localizer installs a database sample with its project, so you can try the steps above without your own database.
SampleDB.mdb, an Access database, and the projectDB Localization Demo.loc, in German and French.- Six tables show both schemes, a rows filter, and key columns that group rows into folders; SQL monitoring is on, so Output shows every statement.
More about database localization.
What database content to localize
Many applications keep user-facing text in tables instead of resource files: product descriptions, messages, labels, prompts, and help text. Lingobit reads the configured source-language columns or rows of ODBC-compatible databases and writes the translations into language columns or language rows.
Internal IDs, technical fields, audit columns, runtime-only data, stored procedures, and SQL code are not translated.
Prepare the database for localization
- Identify the tables with user-facing text, and keep stable keys for localizable records.
- Separate user-facing text from technical values, and do not build sentences from many database fragments.
- Decide whether translations belong in columns or rows, and use consistent language identifiers.
- Document which fields to translate, back up the content before writing translations, and test it in the application before deployment.
Clear boundaries
- Lingobit does not design the database schema or replace database administration.
- The application decides how localized content is loaded at runtime and what happens when a translation is missing.
- Database permissions, backups, migrations, and deployment stay with your team.
Related paths
- Localization QA — Validation, placeholder checks, and maximum length.
- Translation workflow — Translators work in Lingobit, not in the database.
- Release workflow — Scan for Changes for every release.
- Compare editions — Database localization is part of Enterprise.