The new version 1.7 of Active Query Builder ActiveX and VCL Editions and Active Query Builder .NET Edition since version 1.1.5 have ability to localize the component and to switch between languages in run-time.
Currently there are a few languages available, but you can make your own translation with ease and apply it to the component immediately!
ActiveX and VCL Editions:
There are two ways to select language. First is to select it from the list of available languages. If you can not find your language in this list, you may localize the component by yourself and load your language from .lng file.
Selecting language in VCL Edition (Delphi):
// use this unit to get access to acQBLanguageManager global object
uses acQBLocalizer;
// show languages
for i:=0 to acQBLanguageManager.LanguagesCount-1 do
begin
ShowMessage(acQBLanguageManager.Language[i].LanguageName);
end;
// set built-in default language
acQBLanguageManager.CurrentLanguageIndex := -1;
// set language #0
acQBLanguageManager.CurrentLanguageIndex := 0;
// load and apply custom language from file (lng is integer)
lng := acQBLanguageManager.AddLanguageFromFile('MyLanguage', 'MyLang.lng');
acQBLanguageManager.CurrentLanguageIndex := lng;
// load and apply language from resource
// (lng is integer, MyLang is resource name, LANGUAGES is resource type)
lng := acQBLanguageManager.AddLanguageFromResource('MyLanguage', 'MyLang', 'LANGUAGES');
acQBLanguageManager.CurrentLanguageIndex := lng;
// load and apply language from string (lng is integer, sLanguage is string)
lng := acQBLanguageManager.AddLanguageFromString('MyLanguage', sLanguage);
acQBLanguageManager.CurrentLanguageIndex := lng;
// load and apply language from TStrings (lng is integer, ssLanguage is TStrings)
lng := acQBLanguageManager.AddLanguageFromStrings('MyLanguage', ssLanguage);
acQBLanguageManager.CurrentLanguageIndex := lng;
Selecting language in ActiveX Edition (VB.NET):
' show languages
For i = 0 To ActiveQueryBuilderX1.Localizer.Count - 1
MsgBox "Language #" + Str(i) + ": " + ActiveQueryBuilderX1.Localizer.LanguageName(i)
Next i
' set built-in default language
ActiveQueryBuilderX1.Localizer.CurrentLanguage = -1
' set language #0
ActiveQueryBuilderX1.Localizer.CurrentLanguage = 0
' load and apply custom language from file
lng = ActiveQueryBuilderX1.Localizer.AddLanguageFromFile("MyLanguage", "MyLang.lng")
ActiveQueryBuilderX1.Localizer.CurrentLanguage = lng
' load and apply custom language from string (sLanguage is string)
lng = ActiveQueryBuilderX1.Localizer.AddLanguageFromString("MyLanguage", sLanguage)
ActiveQueryBuilderX1.Localizer.CurrentLanguage = lng
Selecting language in ActiveX Edition (C#):
// show languages
for (int i = 0; i < axActiveQueryBuilderX1.Localizer.Count; ++i)
{
MessageBox.Show("Language #" + i.ToString() + ": " +
axActiveQueryBuilderX1.Localizer.get_LanguageName(i));
}
// set built-in default language
axActiveQueryBuilderX1.Localizer.CurrentLanguage = -1;
// set language #0
axActiveQueryBuilderX1.Localizer.CurrentLanguage = 0;
// load and apply custom language from file
int lng = axActiveQueryBuilderX1.Localizer.AddLanguageFromFile("MyLanguage", "MyLang.lng");
axActiveQueryBuilderX1.Localizer.CurrentLanguage = lng;
// load and apply custom language from string (sLanguage is string)
int lng = axActiveQueryBuilderX1.Localizer.AddLanguageFromString("MyLanguage", sLanguage);
axActiveQueryBuilderX1.Localizer.CurrentLanguage = lng;
Selecting language in .NET Edition:
// How to load a language from an external source:
// load language from specified file
ActiveDatabaseSoftware.ActiveQueryBuilder.Helpers.Localizer.LoadLanguageFromFile(string languageFile);
// load language from a XML string
ActiveDatabaseSoftware.ActiveQueryBuilder.Helpers.Localizer.LoadLanguageFromString(string xmlString);
// load language from a stream containing an XML string
ActiveDatabaseSoftware.ActiveQueryBuilder.Helpers.Localizer.LoadLanguageFromStream(Stream languageStream);
// How to get a list of available languages:
foreach (string lng in ActiveDatabaseSoftware.ActiveQueryBuilder.Helpers.Localizer.Languages)
{
Trace.WriteLine(lng);
}
// The language list always contains "Auto" and "Default" strings.
// - "Auto" means the language will be detected automatically according to CultureInfo specified for
// UI culture of the current thread (System.Threading.Thread.CurrentThread.CurrentUICulture).
// - "Default" means usage of default strings containing in embedded resources.
// How to set current language:
ActiveDatabaseSoftware.ActiveQueryBuilder.Helpers.Localizer.Language = "es-MX";
// If specified language doesn't exist, Localizer will try to fallback to the base language ("es")
// If it doesn't exist too, the Localizer will use the "Default" language.
Please find the 'en.xml' file in the installation directory and translate it to your language using any XML editor you like.
We recommend the following way to localize Active Query Builder:
Download and install the component and find the 'English.lng' file in 'Languages' directory.
Download and install IniTranslator application for fast and easy translation.
Open 'English.lng' file as Original. We also recommend you to set highlighted IniTranslator options as shown on the screenshot:

Now you may start to translate. Below are the form screenshots intended to ease translation process. Each section of .lng file represents a form (window), except the [Active Query Builder] section that contains common strings used in Active Query Builder (popup menus, grid captions, error messages, etc.).
If you find that some of translated strings doesn't fit the form, try to cut the string, or tell us about this case so we can allocate more space on the form for it.
There are two strings in the [General Settings] section that should be set in exact matching to your language: 'CharSet' and 'BiDiMode'. First item specifies required character set of the font and second specifies the bi-directional mode of controls. All possible values are listed in the comments in 'English.lng' file, so all you need is to uncomment settings that fit your language and copy them to your translation file.
Important notice: When saving your translation in IniTranslator, please select the "File" -> "Save Translation As..." item from main menu and choose 'ANSI' from the Encoding combobox at the bottom.
[TacDatasourcePropsForm] - This form represents properties of any data source object in the query.

[TacLinkPropsForm] - This form represents options of JOIN clause.

[TacQueryPropsFbForm], [TacQueryPropsIbForm] - These forms represent common properties of InterBase and Firebird SQL queries.

[TacQueryPropsSbForm] - This form represents common properties of Sybase SQL queries.

[TacQueryPropsMSForm] - This form represents common properties of MS SQL Server queries.

[TacQueryPropsMYForm] - This form represents common properties of MySQL queries.

[TacAddObjectForm] - This form is used to add objects to the query.

[TacProcedureParams] - This form required to get input parameter values of stored procedures and functions.
[TfMetadataContainerEditor] - This form is used to manage objects stored in Metadata Container.

[TfacQBMetadataContainerLoad] - This wizard is used to load metadata to Metadata Container. It consists of the following steps:
Step 1. Welcome message.

Step 2. Selecting SQL Syntax.

Step 3. Selecing Connection Type.

Step 4. Specifying connection options.

Step 5. Selecting databases.

Step 6. Specifying additional fintration.

Step 7. Loading Metadata.

[TfrAcQBBDEConnectionEdit] - BDE Connection Options. This frame is used internally in the Load Metadata Wizard on the fourth step.

[TfrAcQBADOConnectionEdit] - ADO Connection Options. This frame is used internally in the Load Metadata Wizard on the fourth step.

[TfrAcQBdbExConnectionEdit] - dbExpress Connection Options. This frame is used internally in the Load Metadata Wizard on the fourth step.

[TfrAcQBIBExConnectionEdit] - IbExpress Connection Options. This frame is used internally in the Load Metadata Wizard on the fourth step.


[TfrFilterEditor], [TfEditMetadataFilter] - This form is intended to define metadata filters. You should call the EditMetadataFilter method to open this form.

[TfmAQBOptions] - This form is the second page of the Properties window. You should call the EditProperties method to open this form.

[TSQLFormatFrame], [TfmSQLBuilderOptions] - This form and its frame are the third page of the Properties window.

[TfmAQBOptions2] - This form is the first page of the Properties window.
