Problem with Default Translation of Constants

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
rallef
Posts: 1
Joined: Sat Jun 19, 2010 12:54 am

Problem with Default Translation of Constants

Post by rallef »

Hello,

I'll try to explain my problem:

while starting the application I look if there is a .sib file. If it's there it will be loaded. If it's not there I'll go on without loading..., so the default language stored will be the one that is valid.

I put some strings to constants (example: 'Would you like to save the changes?") to a unit without a form. So, if there is no .sib file to load, the constant is initialized with an empty string because there is no "ChangeLanguage" event that will read the default string stored with the .frm.

Is there any function to load just the default values for the constants (var strings) stored in the .frm's without changing the language forward and back to get an "ChangeLanguage" event that would also try to read all the caption's?

Another question:
Is there any "exclude list" to add components?
I saw that it's possible to add Properties to an exclude list. We have a lot of components we don't want to exclude in every form by hand.
I just did this on an project with > 300 forms... was a lot of work.

TIA

Ralf
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,

String constants are translated in UpdateStrings method. So you can call this upon start-up to initialize them with the values from DFM. Also there is an option in TsiLang Expert "Empty string constants", if you deactivate it the Expert won't remove the original value of the constant from the code and it will be always initialized.

There is DoNotTranslate property which allows to exclude components, also there you can add a component's type to exclude all components of such type.
Best regards,
Igor Siticov.
Post Reply