cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Language Dynamically

Priyank
Associate III

Hi, I know this is a bit of an off question. Is it possible to add a language dynamically? Without filling out the dictionary in the TouchGFX application? 

1 ACCEPTED SOLUTION

Accepted Solutions
LouisB
ST Employee

Hello @Priyank ,

You can't add dynamic languages but you can add dynamic translations.

 

Best regards,

Louis BOUDO
ST Software Developer | TouchGFX

View solution in original post

2 REPLIES 2
Marc_LM
Associate III

The language portion of the HAL from TouchGFX hints at dynamic loading.
I didn't fully study it yet but check the following sections of the framework.

HAL& touchgfx_generic_init(...){
    Texts::setLanguage(0);// PreBuilt Text Bin 
}

// Generated by TouchGFX
void touchgfx::Texts::setLanguage(touchgfx::LanguageId id)
{
    const touchgfx::TypedText::TypedTextData* currentLanguageTypedText = 0;
    if (id < 2)
    {
        if (languagesArray[id] != 0)
        {
            // Dynamic translation is added
            ...
        }
        else
        {
            // Compiled and linked in languages
            currentLanguagePtr = texts_all_languages;
            currentLanguageIndices = staticLanguageIndices[id];
            currentLanguageTypedText = typedTextDatabaseArray[id];
        }
    }

 

There is also the Ruby tools they include in the projects.
$project$\touchgfx\framework\tools\textconvert/

We could probably ask to add dynamic loading in the example:
https://support.touchgfx.com/academy/tutorials/tutorial-06/tutorial-06-part-1#create-a-new-language

LouisB
ST Employee

Hello @Priyank ,

You can't add dynamic languages but you can add dynamic translations.

 

Best regards,

Louis BOUDO
ST Software Developer | TouchGFX