Central Control for Large Application
Posted: Thu Sep 23, 2010 5:44 pm
Hi,
I have downloaded the latest version and have been trying to figure out how to make the component set work for a large application. I have two primary needs.
First, I need to translate generic terms. For example, I currently might have something like the following for a TLabel caption:
"%Company% Name:"
After construction of the form, I currently process all the Captions and do substitutions. In the above example, the end-user might configure a setting to change the word Company to Organization. Therefore, upon display, the default caption would be "Company Name:" or if the word Company has been renamed, it might read, "Organization Name:". Throughout the application, 200+ forms, there is one method in the ancestor form class that pre-processes all the terminology changes.
The second requirement is to do traditional language changes (english, spanish, japanese, etc). However, because there are 100s of very common terms used throughout the application, I want a central datamodule to process most of the changes. I cannot see how to do this very easily using these components. I did have one idea, which was to have two languages on every form. One called "Default" and the other "Coded." The coded column would have a coded value. When the language is switched to "Coded", it would then call the translation datamodule to process the Code into a translatable term. Using the example above, the "default" value would be "Company Name" and the "coded" value would be "COMPNAME." Then, the translating datamodule would look up "COMPNAME" and use the translated text for "Company Name." Using this example, if there were 100 references throughout the application to "Company Name", it would be automatically changed throughout the application.
Is there another way or suggestion??
Thanks,
Kevin
I have downloaded the latest version and have been trying to figure out how to make the component set work for a large application. I have two primary needs.
First, I need to translate generic terms. For example, I currently might have something like the following for a TLabel caption:
"%Company% Name:"
After construction of the form, I currently process all the Captions and do substitutions. In the above example, the end-user might configure a setting to change the word Company to Organization. Therefore, upon display, the default caption would be "Company Name:" or if the word Company has been renamed, it might read, "Organization Name:". Throughout the application, 200+ forms, there is one method in the ancestor form class that pre-processes all the terminology changes.
The second requirement is to do traditional language changes (english, spanish, japanese, etc). However, because there are 100s of very common terms used throughout the application, I want a central datamodule to process most of the changes. I cannot see how to do this very easily using these components. I did have one idea, which was to have two languages on every form. One called "Default" and the other "Coded." The coded column would have a coded value. When the language is switched to "Coded", it would then call the translation datamodule to process the Code into a translatable term. Using the example above, the "default" value would be "Company Name" and the "coded" value would be "COMPNAME." Then, the translating datamodule would look up "COMPNAME" and use the translated text for "Company Name." Using this example, if there were 100 references throughout the application to "Company Name", it would be automatically changed throughout the application.
Is there another way or suggestion??
Thanks,
Kevin