Hello,
is it possible to define global string constants? I have several same strings which are used in Dialogs, Print doc, ...
Thanks for your help
I'm using 6.1 Suite
Global String Constants
Hello,
Could you please describe more detailed what do you mean under global string constant? If it is the same as mentioned under http://www.sicomponents.com/forum/viewtopic.php?t=500 then the answer would be the same. In case you have similar strings under Dialogs section and some others then it is not possible to use them automatically. You will need to add "manual" code for retrieving these strings. I mean in the place of code where you use some string similar to one from Dialogs section you can use the method GetTextFrom() or GetStringValue() of TsiLang.
Could you please describe more detailed what do you mean under global string constant? If it is the same as mentioned under http://www.sicomponents.com/forum/viewtopic.php?t=500 then the answer would be the same. In case you have similar strings under Dialogs section and some others then it is not possible to use them automatically. You will need to add "manual" code for retrieving these strings. I mean in the place of code where you use some string similar to one from Dialogs section you can use the method GetTextFrom() or GetStringValue() of TsiLang.
Best regards,
Igor Siticov.
Igor Siticov.
It is not the same like Id 500. 500 was dealing with String placed in a form.
Here I'm talking about String Constants which I need for several purpose and these strings are not placee on a form.
1. Yor methods (GetTextFrom() and GetStringValue()) you mentioned are not visible in Helpfile, are these available?
2. Do I have access to the Dictionary?
3. If yes how can I access a string?
Now I create a form, which will not be visible, and place TLabel on the form. Then I can translate these labels and access from all forms these strings. Is this a nice solution?
Thanks for your help
Here I'm talking about String Constants which I need for several purpose and these strings are not placee on a form.
1. Yor methods (GetTextFrom() and GetStringValue()) you mentioned are not visible in Helpfile, are these available?
2. Do I have access to the Dictionary?
3. If yes how can I access a string?
Now I create a form, which will not be visible, and place TLabel on the form. Then I can translate these labels and access from all forms these strings. Is this a nice solution?
Thanks for your help
Ah sorry, then I didn't understand the question. Then the answer will be similar to one provided before:
This will require some "manual" work:
1. You can declare some global string variables in some common unit. (As they are already declared I assume)
2. Create some function that will initialize these variables with the content.
3. Translate this function content using TsiLang Expert (File -> Source menu)
4. Under OnChangeLanguage event of TsiLang you will need to call this function.
So the content of these strings will update upon language changing.
This will require some "manual" work:
1. You can declare some global string variables in some common unit. (As they are already declared I assume)
2. Create some function that will initialize these variables with the content.
3. Translate this function content using TsiLang Expert (File -> Source menu)
4. Under OnChangeLanguage event of TsiLang you will need to call this function.
So the content of these strings will update upon language changing.
Best regards,
Igor Siticov.
Igor Siticov.