2024-11-26 01:48 PM
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?
Solved! Go to Solution.
2024-11-28 05:35 AM
Hello @Priyank ,
You can't add dynamic languages but you can add dynamic translations.
Best regards,
2024-11-26 02:21 PM
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
2024-11-28 05:35 AM
Hello @Priyank ,
You can't add dynamic languages but you can add dynamic translations.
Best regards,