Forum > Translations
[SOLVED] LCLTranslator: update of current form possible?
wp:
I don't understand what you are doing exactly. Doesn't the project in examples/translations (or examples/techniques/translations in Laz-main) do what you want to? Could you set up a small demo project?
howardpc:
Ah, thank you Werner and Sieben. I was unaware of the Techniques example.
All I needed to do was steal TLocalizedForm, and make my initial dialog a descendent form of that class (rather than of the TForm class), and override the protected UpdateTranslations method.
Perhaps a further entry could be added to the Module node of the New... dialog in the IDE offering TLocalizedForm as the basis for multi-language windows?
It is too useful to be hidden away in an example project.
AL:
form.repaint or form.update after SetDefaultLang(lang) has done the trick for me
dsiders:
--- Quote from: howardpc on April 09, 2022, 10:53:03 pm ---All I needed to do was steal TLocalizedForm, and make my initial dialog a descendent form of that class (rather than of the TForm class), and override the protected UpdateTranslations method.
Perhaps a further entry could be added to the Module node of the New... dialog in the IDE offering TLocalizedForm as the basis for multi-language windows?
It is too useful to be hidden away in an example project.
--- End quote ---
Sounds reasonable. But looking at the implementation, it has a lot of Windows-specific code. That might be the reason its not already in the New > Module > Form options. Does it work for other platforms?
@AL?
howardpc:
--- Quote from: dsiders on April 10, 2022, 05:59:49 am ---Does it work for other platforms?
--- End quote ---
The utilities to do with LCID and FormatSettings are Windows-only. And the LCID functions only deal with a couple of dozen of the many language ids. But I suspect this unit is a work in progress.
The UpdateTranslation functionality is cross-platform.
Navigation
[0] Message Index
[#] Next page
[*] Previous page