Multi Language Text Feature

Top  Previous  Next

Multi Language Text Feature provides that it is possible to define texts in several languages and choose a language in runtime.

 

Step 1: Defining languages

To use Multi Language Text Feature, before starting .NET project, you need to create a Configuration File that includes Language Definitions.

Configuration File is created by Gelecek HMI Components Configurator (GelecekHMICompConfigurator.exe) which is supplied with demo download of our software.        

conf languages

 

Create file, define languages and save file in a known location.

 

Step 2: Setting multi language text properties of controls

multi lang text editor2

 

 

Step 3: Changing language

 

In runtime, User may change language.

Basic Way:

Basic way is to use a simple control : gLanguageSelector.

language selector toolbox

In runtime its view:

language kontrol

 

 

Code way:

Use this method to change language:

bool result = GelecekCommon.gGlobalObjects.gLanguageManager.gSetActiveLanguage("English");

//For a successful language change, result should be true.

         

 

LanguageChanged event

When language changes, "GelecekCommon.gGlobalObjects.gLanguageManager.gEventActiveLanguageChanged" event occurs.

 

C# code syntax

private void LanguageManager_gEventActiveLanguageChanged(object sender, string language_name)