sgcLocalization: Translate Your Delphi Applications and Switch Language While They Run

· Components
sgcLocalization: Translate Your Delphi Applications and Switch Language While They Run
New product · sgcLocalization

One application. Five languages.
Switched while it runs.

sgcLocalization translates your own Delphi, C++Builder and Lazarus applications. Every form, every message, every plural, with one editor and one line of code to change the language.

  • English
  • Deutsch
  • Español
  • Français
  • Italiano
The dashboard of the same Delphi application shown five times, in English, German, Spanish, French and Italian, in light and dark themes
1line to switch
3frameworks
7 to 13Delphi versions
0extra cost with sgcUI

The picture above is one executable. The same dashboard, the same data, in English, German, Spanish, French and Italian, and the user changes the language from a combo box while the application runs. No restart and no second build.

That application was translated with sgcLocalization, a new product of the sgcUI suite. It works with VCL, FireMonkey and LCL, from Delphi 7 to Delphi 13, in C++Builder and in Lazarus, and it is included with every sgcUI edition and with every single product.

sgcLocalization in one minute: scan, translate and switch a real application. Also on YouTube.

Switch the Language with One Line

This is all the code the language change needs:

uses
  sgcLocalization_Engine;

procedure TfrmMain.btnGermanClick(Sender: TObject);
begin
  sgcSetLanguage('de');
end;

If you prefer no code at all, drop the ready-to-use language combo on the form (TsgcVCLLanguageCombo or TsgcFMXLanguageCombo). It lists the languages of your project and switches when the user picks one.

The orders page of the same application in English, German and Italian: toolbar, navigation, search box, grid headers, data and number formats all change
The same page in English, German and Italian. Toolbar, navigation, grid headers, hints and data follow the language.

The switch does more than replace captions:

To start in the language of the user's system, set one property:

sgcVCLLocalizer1.Language := 'auto';

How Little Work It Takes

1DropPut a localizer component on the main form.
2ScanIt collects the texts of your forms, frames and data modules.
3TranslateBy hand, with a translator through XLIFF, or with AI proposals.
4SwitchOne line of code, or the language combo.

The localizer (TsgcVCLLocalizer for VCL, TsgcFMXLocalizer for FireMonkey) finds every text property through RTTI. You do not mark properties, you do not rename components and you do not change your forms.

Built-in ignore rules skip what is never text: component names, field names, SQL, file names, format strings, and the non-text properties of the sgcUI controls themselves. You can add your own rules. A form that mixes standard controls and sgcUI controls scans cleanly, so the list you translate contains texts and nothing else.

Texts in Code: Snippets

Not every text lives in a form. Messages, status lines and captions built in code are snippets. Wrap the text in sgcT and it becomes translatable:

if MessageDlg(sgcT('Save changes?'), mtConfirmation,
  [mbYes, mbNo], 0) = mrYes then
  SaveOrder;

The same word can need two translations. In English "Open" is both a command and the state of an order. sgcTC adds a context, so each meaning gets its own translation:

btnOpen.Caption := sgcTC('command', 'Open');
lblState.Caption := sgcTC('order status', 'Open');

Plurals use sgcTN. You write the singular and the plural of the source language, and the translation supplies as many forms as the target language needs:

lblSelected.Caption := sgcTN('%d order selected', '%d orders selected',
  Count, [Count]);

The plural rules come from CLDR, so they are right for every language. Polish, for example, gets four forms, and the editor asks the translator for each one of them.

One Translation Editor

All the translations are edited in one place. Right click the localizer at design time to open the editor inside the IDE, or use the standalone tool outside it.

The sgcLocalization translation editor in light and dark themes: a grid with the source text and the German, Spanish and French translations of every item, state filters, and an edit panel with source, translation, note and proposal
The translation editor, light and dark. One row per text, one column per language, the state of every item at a glance.

Validation That Catches the Usual Mistakes

A translation that drops a %d or an accelerator key is easy to write and hard to spot. sgcLocalization checks every translation, whether it was typed, imported or proposed by AI:

The validation tab of the translation editor showing an error for format specifiers that differ from the source and a warning for line breaks that differ
The German text lost a format specifier. It is reported as an error before it reaches a customer.

An item with an error cannot be set to reviewed, so a broken text does not slip into a release as finished work.

AI Translation, as Proposals

The editor can translate with AI services such as ChatGPT, Claude, Gemini and Ollama. Choose the target languages, give it a glossary and instructions about tone, and start.

The AI translation dialog: target languages German and French selected, scope new and changed texts, a glossary and instructions for a formal tone
Target languages, scope, glossary and instructions for the AI translation.

The results arrive as proposals. You accept or reject each one, and a proposal never overwrites a text that is already translated. The same validation runs on them.

Good to know. AI translation goes through the sgcUI AI provider. The named services need sgcWebSockets. Without it, an event lets you call any service you like from your own code.

XLIFF for Professional Translators

Translation agencies work with XLIFF. sgcLocalization exports XLIFF 1.2 for a language, and imports the file when it comes back.

An import never writes directly into your project. It opens a review list with every change: the old text, the new text, the kind of change and any issue found. Only the rows you tick are applied.

The XLIFF import review list for a French file: each row shows the item, the kind of change, the old and new text, the new state and issues, with a check box to apply it
The review of an XLIFF import. Rows with problems are left unticked and nothing is applied until you press Apply.

One Project File

The translations of an application live in one project file with the extension .sgcloc. It is JSON, so it is friendly to version control: a changed translation is a small diff you can read in a code review. If you prefer a single executable with nothing beside it, the project can be embedded in the form file instead.

See It in a Real Application

The showcase demo is Order Desk, a complete business application: a dashboard, orders, customers, a planner, pivot analysis, a wizard and a print preview. It is translated into English, German, Spanish, French and Italian, and it comes in VCL, FireMonkey and Lazarus versions.

The planner page of the Order Desk demo in French: week view with deliveries, French day names, toolbar and navigation
The planner of Order Desk in French. Day names, views and appointments follow the language.

The demo folder also has three quick starts, the standalone translation editor tool, and a Getting Started guide that takes you from an empty form to a translated application.

Included with sgcUI

sgcLocalization ships with sgcUI 2026.12.0. It is not sold separately: it is included with every sgcUI edition and with every single product, and it is selected by default in the installer.

Your Application, in Your Customer's Language

Download sgcUI, open the Order Desk demo and change the language while it runs. Then drop a localizer on your own main form.

Questions or feedback? Get in touch, you will get a reply from the people who wrote the code.